:root {
  --sidebar-width: 260px;
  --auth-primary-color: #f0e5d4;
  color: #172033;
  background: #f5f7fb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-tabs,
.search-row,
.section-head,
.tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 20px;
}

.search-row input {
  min-width: 280px;
}

.tabs {
  margin: 12px 0 18px;
}

.tabs a {
  border: 1px solid #d7dce5;
  border-radius: 999px;
  color: inherit;
  padding: 8px 12px;
  text-decoration: none;
}

.tabs a.active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.notice {
  color: #2563eb;
  margin: 0;
}

* { box-sizing: border-box; }
html,
body {
  max-width: 100%;
}
body { margin: 0; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.ajax-indicator {
  position: fixed;
  inset: 0;
  z-index: 15000;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, background-color .18s ease;
}

.ajax-indicator span {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgb(37 99 235 / 90%), rgb(34 197 94 / 90%)),
    #fff;
  box-shadow: 0 18px 44px rgb(37 99 235 / 22%);
  animation: live-splash 1s ease-in-out infinite alternate;
}

.ajax-active .ajax-indicator {
  opacity: 1;
  background: rgb(255 255 255 / 30%);
}

.turbo-progress-bar {
  position: fixed;
  z-index: 10000;
  top: 0;
  left: 0;

  width: 0;
  height: 3px;

  background: #4299e1;

  opacity: 0;
  pointer-events: none;

  box-shadow:
    0 0 4px rgb(66 153 225 / 45%);

  transition:
    width 220ms ease-out,
    opacity 160ms ease;
}

.turbo-progress-bar.is-visible {
  opacity: 1;
}

[data-page-content].is-live-refreshing {
  opacity: .72;
  transform: scale(.995);
  transition: opacity .18s ease, transform .18s ease;
}

[data-page-content].live-updated .panel,
[data-page-content].live-updated .modal-card,
[data-page-content].live-updated .entity-card,
[data-page-content].live-updated .metric,
[data-page-content].live-updated .stat {
  animation: live-pop .45s ease both;
}

.live-splash {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgb(37 99 235 / 90%), rgb(34 197 94 / 90%)),
    #fff;
  box-shadow: 0 18px 44px rgb(37 99 235 / 22%);
  animation: live-splash 1s ease-in-out infinite alternate;
}

@keyframes live-pop {
  from {
    opacity: .45;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes live-splash {
  from {
    transform: scale(.86) rotate(-8deg);
    filter: saturate(.85);
  }
  to {
    transform: scale(1) rotate(8deg);
    filter: saturate(1.15);
  }
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card, .panel, .metric, .stat {
  background: #fff;
  border: 1px solid #e3e8f1;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgb(30 41 59 / 6%);
}

.auth-card {
  width: min(420px, 100%);
  padding: 28px;
  display: grid;
  gap: 16px;
}

.auth-card.wide { width: min(560px, 100%); }
.auth-card h1, .topbar h1, .panel h2 { margin: 0; letter-spacing: 0; }
.panel h2 { font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.auth-card p, .panel p { color: #667085; margin: 0; }
.auth-code-popover-wrap { position: relative; display: grid; }
.auth-code-popover { position: absolute; z-index: 50; top: calc(100% + 8px); right: 0; left: 0; display: grid; gap: 8px; padding: 14px; border: 1px solid #dce3ee; border-radius: 10px; background: #fff; box-shadow: 0 14px 34px rgb(30 41 59 / 18%); }
.auth-code-popover > strong { color: #172033; font-size: 15px; }
.auth-code-popover > p { font-size: 12px; }
.auth-code-method { min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid #dce3ee; border-radius: 8px; color: #172033; cursor: pointer; }
.auth-code-method:has(input:checked) { border-color: #172033; background: #f8fafc; }
.auth-code-method input { width: 17px; height: 17px; margin: 0; accent-color: #111; }
.auth-code-method small { margin-left: auto; color: #98a2b3; }
.auth-code-method.disabled { color: #98a2b3; cursor: not-allowed; }
.auth-card .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-card .col { min-width: 0; }
.auth-card .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 1px solid #dce3ee; border-radius: 8px; padding: 10px 12px; background: #fff; color: #172033; font: inherit; font-weight: 600; cursor: pointer; }
.auth-card .btn:hover { background: #f8fafc; }
.auth-card .btn svg { flex: 0 0 auto; }
@media (max-width: 560px) {
  .auth-card .row { grid-template-columns: 1fr; }
}

label {
  display: grid;
  gap: 7px;
  color: #465266;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

label.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  white-space: nowrap;
}

label.checkbox input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
}

input, select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cfd7e6;
  border-radius: 7px;
  padding: 8px 10px;
  color: #172033;
  background: #fff;
}

input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid #9cc3ff;
  outline-offset: 2px;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  padding: 8px 14px;
  cursor: pointer;
}

button:disabled { opacity: .55; cursor: not-allowed; }
button:active { transform: translateY(1px); }

.booking-toast {
  position: fixed;
  z-index: 20000;
  right: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 12px;
  background: #1f7a45;
  box-shadow: 0 12px 28px rgb(15 23 42 / 24%);
  color: #fff;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .2s ease, transform .2s ease;
}
.booking-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.booking-toast span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: rgb(255 255 255 / 20%);
  font-weight: 800;
}

.booking-page { display: grid; min-width: 0; gap: 14px; }
.booking-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.booking-nav, .booking-filters { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.booking-nav-group { display: grid; gap: 6px; }
.booking-online-link { display: flex; align-items: center; gap: 6px; min-width: 0; color: #667085; font-size: 12px; }
.booking-online-link a { overflow: hidden; min-height: 28px; padding: 5px 8px; border: 1px solid #d0d5dd; border-radius: 6px; background: #fff; color: #344054; text-overflow: ellipsis; white-space: nowrap; }
.booking-online-copy { display: inline-grid; flex: 0 0 auto; width: 28px; height: 28px; min-width: 28px; padding: 5px; place-items: center; }
.booking-online-copy img { width: 16px; height: 16px; }
.booking-nav { position: relative; z-index: 110; }
.booking-slot-settings { display: flex; align-items: end; gap: 6px; margin-left: 10px; }
.booking-slot-settings strong { display: flex; align-self: end; align-items: center; width: auto; min-height: 34px; font-size: 12px; white-space: nowrap; }
.booking-slot-settings label { display: grid; gap: 3px; color: #667085; font-size: 11px; }
.booking-slot-settings input { width: 68px; min-height: 34px; padding: 5px 7px; }
.booking-slot-settings button { min-height: 34px; }
.booking-filters label { display: grid; gap: 4px; font-size: 12px; color: #667085; }
.booking-date-picker { position: absolute; z-index: 120; top: calc(100% + 8px); left: 36px; display: grid; gap: 10px; width: 286px; padding: 12px; border: 1px solid #d9dee8; border-radius: 10px; background: #fff; box-shadow: 0 12px 28px rgba(16, 24, 40, .16); }
.booking-date-picker[hidden] { display: none; }
.booking-picker-head { display: flex; align-items: center; justify-content: space-between; }
.booking-picker-head strong { font-size: 14px; text-transform: capitalize; }
.booking-picker-head button[data-booking-picker-month] {
  min-width: 28px;
  padding: 4px 8px;
}
.booking-picker-weekdays, .booking-picker-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; }
.booking-picker-weekdays { color: #667085; font-size: 11px; }
.booking-picker-day, .booking-picker-empty { display: grid; min-width: 0; width: 100%; min-height: 0; aspect-ratio: 1; padding: 0; place-items: center; box-sizing: border-box; border: 0; border-radius: 6px; background: transparent; color: #344054; font-size: 12px; line-height: 1; text-align: center; }
.booking-picker-day { cursor: pointer; }
.booking-picker-day:hover, .booking-picker-day.is-in-range { background: #fff1bd; }
.booking-picker-day.is-selected { background: #4299e1; color: #fff; font-weight: 700; }
.booking-picker-day.is-today:not(.is-selected) { color: #667085; font-weight: 600; }
.booking-picker-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #eaecf0; padding-top: 10px; color: #667085; font-size: 11px; }
.booking-calendar-viewport { max-height: min(72dvh, calc(100dvh - 220px)); min-height: 320px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable both-edges; border: 1px solid #d9dee8; border-radius: 10px; background: #fff; }
.booking-calendar { display: grid; grid-template-columns: 58px repeat(7, minmax(135px, 1fr)); width: max(100%, 1000px); background: #fff; }
.booking-time-scale, .booking-day { min-width: 0; border-right: 1px solid #e2e6ee; }
.booking-time-scale { position: sticky; left: 0; z-index: 70; background: #fff; border-right: 1px solid #d9dee8; box-shadow: 2px 0 4px rgb(15 23 42 / 5%); }
.booking-day:last-child { border-right: 0; }
.booking-day header { position: sticky; top: 0; z-index: 80; height: 58px; display: grid; align-content: center; padding: 8px 10px; border-bottom: 1px solid #e2e6ee; background: #fff; }
.booking-day header span { font-size: 12px; color: #667085; }
.booking-day header strong { font-size: 18px; }
.booking-time-spacer { position: sticky; top: 0; z-index: 85; height: 58px; border-bottom: 1px solid #e2e6ee; background: #fff; }
.booking-time-body { position: relative; background: #fff; }
.booking-day-body { position: relative; overflow: visible; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--booking-slot-height) - 1px), #cfd4dc var(--booking-slot-height)); background-position: 0 var(--booking-slot-offset); }
.booking-time-body span { position: absolute; right: 7px; transform: translateY(-7px); color: #667085; font-size: 11px; line-height: 1; }
.booking-time-body span:first-child { transform: translateY(2px); }
.booking-time-body .booking-time-hour { right: 7px; color: #101828; font-size: 12px; }
.booking-time-body .booking-time-hour sup { margin-left: 1px; font-size: 9px; vertical-align: super; }
.booking-time-body .booking-time-half { right: 11px; color: #667085; font-size: 11px; }
.booking-day.is-today header { background: #f8fbff; }
.booking-event { --booking-event-gap: 3px; --booking-event-lane: 0; --booking-event-lanes: 1; position: absolute; z-index: 10; left: calc((100% / var(--booking-event-lanes)) * var(--booking-event-lane) + 4px); width: calc(100% / var(--booking-event-lanes) - 7px); min-width: 34px; display: flex; flex-direction: column; gap: 1px; min-height: 0; overflow: hidden; padding: 4px 5px; border-left: 4px solid #4299e1; border-radius: 7px; background: #eef4ff; color: #18312d; font-size: 10px; line-height: 1.15; box-shadow: 0 1px 2px rgb(16 24 40 / 8%); cursor: pointer; transition: box-shadow .14s ease, transform .14s ease, filter .14s ease, opacity .14s ease; }
.booking-event.has-overlap { border-left-width: 4px; }
.booking-event:hover, .booking-event:focus-within, .booking-event:focus-visible { z-index: 60; min-height: 86px; overflow: visible; padding: 7px 8px; transform: translateY(-2px) scale(1.01); background: #f5f8ff; box-shadow: 0 12px 28px rgb(15 23 42 / 24%); filter: saturate(1.05); }
.booking-event:active { transform: translateY(0) scale(.995); }
.booking-event.is-narrow { padding: 3px; border-left-width: 3px; font-size: 9px; }
.booking-event.is-narrow:hover, .booking-event.is-narrow:focus-within { width: min(230px, calc(100% * 1.8)); min-width: 150px; }
.booking-event.is-narrow.is-last-lane:hover, .booking-event.is-narrow.is-last-lane:focus-within { left: auto; right: 4px; }
.booking-event.is-short { justify-content: center; padding: 2px 4px; }
.booking-event-short-summary { display: none; }
.booking-event.is-short .booking-event-head, .booking-event.is-short .booking-event-client, .booking-event.is-short .booking-event-service, .booking-event.is-short .booking-event-phone { display: none; }
.booking-event.is-short .booking-event-short-summary { display: block; }
.booking-event.is-short:hover { min-height: 86px; padding: 7px 8px; }
.booking-event.is-short:hover .booking-event-head, .booking-event.is-short:hover .booking-event-client, .booking-event.is-short:hover .booking-event-service, .booking-event.is-short:hover .booking-event-phone { display: initial; }
.booking-event.is-short:hover .booking-event-head { display: flex; }
.booking-event.is-short:hover .booking-event-short-summary { display: none; }
.booking-event.is-very-narrow .booking-event-service, .booking-event.is-very-narrow .booking-event-phone { display: none; }
.booking-event:hover .booking-event-client, .booking-event:hover .booking-event-service, .booking-event:hover .booking-event-phone, .booking-event:focus-within .booking-event-client, .booking-event:focus-within .booking-event-service, .booking-event:focus-within .booking-event-phone, .booking-event:focus-visible .booking-event-client, .booking-event:focus-visible .booking-event-service, .booking-event:focus-visible .booking-event-phone { overflow: visible; white-space: normal; text-overflow: clip; }
.booking-event-head { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 2px; }
.booking-event-point { position: static; display: grid; flex: 0 0 auto; width: 16px; height: 18px; min-height: 18px; place-items: center; padding: 2px 3px; border: 0; border-radius: 4px; background: transparent; opacity: 0; cursor: pointer; transition: opacity .12s ease, background .12s ease; }
.booking-event:hover .booking-event-point, .booking-event:focus-within .booking-event-point, .booking-event:focus-visible .booking-event-point { opacity: 1; }
.booking-event-point:hover { background: rgb(255 255 255 / 62%); opacity: 1; }
.booking-event-point img { display: block; width: 10px; height: 14px; object-fit: contain; }
.booking-event-cluster { position: absolute; z-index: 3; left: 10px; transform: translateY(-50%); }
.booking-event-indicator { position: relative; display: grid; width: 36px; height: 36px; min-height: 36px; place-items: center; padding: 2px; border: 0; background: transparent; color: #16a34a; line-height: 1; filter: drop-shadow(0 2px 3px rgb(22 163 74 / 22%)); cursor: pointer; transition: color .18s ease, transform .18s ease; }
.booking-event-indicator svg { display: block; width: 32px; height: 32px; transform: translateY(-12px); }
.booking-event-indicator span { position: absolute; top: -3px; left: 9px; display: grid; width: 16px; height: 13px; place-items: center; color: #fff; font-size: 11px; font-weight: 600; line-height: 1; pointer-events: none; }
.booking-event-cluster:hover, .booking-event-cluster:focus-within { z-index: 25; }
.booking-event-cluster:hover .booking-event-indicator, .booking-event-cluster:focus-within .booking-event-indicator { color: #15803d; transform: scale(1.1); }
.booking-event-submenu { position: absolute; z-index: 30; top: 0; left: 38px; display: none; width: min(300px, calc(100vw - 48px)); max-height: 280px; overflow: auto; padding: 10px; border: 1px solid #d9dee8; border-radius: 10px; background: #fff; color: #344054; box-shadow: 0 14px 34px rgb(16 24 40 / 20%); }
.booking-event-cluster:hover .booking-event-submenu, .booking-event-cluster:focus-within .booking-event-submenu { display: grid; gap: 7px; }
.booking-event-submenu > strong { padding: 0 2px 3px; color: #101828; font-size: 13px; }
.booking-event-submenu-item { display: grid; gap: 2px; width: 100%; min-height: 0; padding: 8px; border: 1px solid #eaecf0; border-left: 4px solid #475467; border-radius: 7px; background: #eef1f5; color: #344054; text-align: left; font-size: 12px; line-height: 1.3; cursor: pointer; }
.booking-event-submenu-item-completed { border-color: #5dcbbc; border-left-color: #0f766e; background: #d5f5ef; }
.booking-event-submenu-item-cancelled, .booking-event-submenu-item-no_show { border-color: #fda29b; border-left-color: #b42318; background: #fee4e2; }
.booking-event-submenu-item:hover, .booking-event-submenu-item:focus-visible { border-color: #84adff; background: #eef4ff; }
.booking-visit-hover-card { position: fixed; z-index: 90; display: grid; gap: 10px; width: 320px; padding: 14px; border: 1px solid #d9dee8; border-radius: 12px; background: #fff; color: #344054; font-size: 13px; line-height: 1.35; box-shadow: 0 16px 36px rgb(16 24 40 / 22%); }
.booking-visit-hover-card p { margin: 3px 0 0; }
.booking-visit-hover-card ul { margin: 4px 0 0; padding-left: 18px; }
.booking-hover-client { color: #101828; font-size: 15px; }
.booking-hover-phone { display: flex; align-items: center; gap: 5px; }
.booking-hover-phone button { display: grid; width: 22px; height: 22px; min-height: 22px; place-items: center; padding: 4px; border: 0; border-radius: 4px; background: transparent; }
.booking-hover-phone img { width: 14px; height: 14px; }
.booking-visit-hover-card label { display: grid; gap: 4px; }
.booking-hover-payments { display: flex; flex-wrap: wrap; gap: 7px 11px; margin: 0; padding: 0; border: 0; }
.booking-hover-payments legend { width: 100%; margin-bottom: 2px; font-weight: 600; }
.booking-hover-payments label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.booking-hover-payments input { width: 14px; height: 14px; margin: 0; }
.booking-visit-hover-card .booking-status { min-height: 32px; margin: 0; padding: 4px 7px; border: 1px solid #d0d5dd; font-size: 13px; }
.booking-hover-save { min-height: 34px; padding: 6px 10px; }
.booking-event[hidden] { display: none; }
.booking-event strong, .booking-event span, .booking-event small { min-height: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.booking-event-client { font-weight: 700; }
.booking-event-service { color: #475467; }
.booking-event-phone { color: #667085; }
.booking-event-completed { border-color: #12b76a; background: #ecfdf3; }
.booking-event-completed:hover, .booking-event-completed:focus-within, .booking-event-completed:focus-visible { background: #ecfdf3; }
.booking-event-cancelled, .booking-event-no_show { border-color: #f04438; background: #fff1f0; opacity: .72; }
.booking-event-cancelled:hover, .booking-event-no_show:hover, .booking-event-cancelled:focus-within, .booking-event-no_show:focus-within, .booking-event-cancelled:focus-visible, .booking-event-no_show:focus-visible { background: #fff1f0; opacity: 1; }
.booking-event-time { font-weight: 600; }
.booking-status { width: 100%; min-height: 18px; margin-top: auto; padding: 1px 3px; border: 0; border-radius: 4px; font-size: 9px; }
.booking-master-calendar .booking-time-spacer,
.booking-master-calendar .booking-master-header {
  height: 54px;
}
.booking-master-calendar .booking-master-header {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 54px;
  min-height: 54px;
  padding: 7px 10px;
  gap: 8px;
  overflow: visible;
  border-bottom: 1px solid #e2e6ee;
  background: #fff;
  box-shadow: 0 2px 4px rgb(15 23 42 / 6%);
}
.booking-master-calendar .booking-day .booking-master-header {
  display: flex;
  align-content: normal;
  align-items: center;
}
.booking-master-calendar .booking-master-header .booking-master-photo,
.booking-master-calendar .booking-master-header .booking-master-initials {
  flex: 0 0 36px;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
}
.booking-master-calendar .booking-master-header .booking-master-photo {
  object-fit: cover;
  border-radius: 9px;
}
.booking-master-calendar .booking-master-header .booking-master-initials {
  display: grid;
  place-items: center;
  background: #e8eefc;
  color: #1d4ed8;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 600;
}
.booking-master-calendar .booking-master-header .booking-master-meta {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: baseline;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
}
.booking-master-calendar .booking-master-header .booking-master-name {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #667085;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.booking-master-calendar .booking-master-header .booking-master-role {
  display: inline;
  flex: 0 0 auto;
  margin: 0;
  color: #98a2b3;
  font-size: 10px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}
.booking-master-calendar .booking-master-header .booking-master-role::before {
  content: "·";
  margin-right: 6px;
  color: #c3cad5;
}
.booking-master-free-popover { position: absolute; z-index: 40; top: calc(100% - 5px); left: 8px; display: none; gap: 5px; width: min(260px, calc(100vw - 32px)); max-height: 280px; overflow: auto; padding: 10px; border: 1px solid #d9dee8; border-radius: 9px; background: #fff; box-shadow: 0 14px 34px rgb(16 24 40 / 20%); }
.booking-master-header:hover .booking-master-free-popover, .booking-master-header:focus-within .booking-master-free-popover { display: grid; }
.booking-master-free-popover > b { margin-bottom: 3px; font-size: 13px; }
.booking-master-free-popover button { display: flex; justify-content: space-between; min-height: 32px; padding: 6px 8px; border: 1px solid #dbe4f4; background: #f7f9fc; color: #344054; font-size: 12px; }
.booking-master-free-popover button:hover { border-color: #84adff; background: #eef4ff; }
.booking-master-free-popover button span { color: #2563eb; font-weight: 700; }
.booking-master-day .booking-day-body { background: #f7f8fa; }
.booking-current-time { position: absolute; z-index: 8; left: 0; right: 0; height: 1px; background: #f04438; pointer-events: none; }
.booking-current-time::before { content: ""; position: absolute; left: -4px; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: #f04438; }
.booking-current-time span { position: absolute; right: 4px; top: -9px; padding: 1px 4px; border-radius: 4px; background: #fff; color: #d92d20; font-size: 10px; font-weight: 600; }
.booking-working-interval { position: absolute; inset-inline: 0; z-index: 1; background: #fff; }
.booking-grid-create { position: absolute; z-index: 2; right: 4px; display: grid; width: 18px; height: 18px !important; min-height: 18px; box-sizing: border-box; place-items: center; margin-top: 3px; padding: 0; border: 1px solid rgb(37 99 235 / 34%); border-radius: 50%; background: #eff6ff; color: rgb(37 99 235 / 58%); font-size: 15px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .12s ease, background .12s ease; }
.booking-day-body:hover .booking-grid-create { opacity: .35; }
.booking-grid-create:hover, .booking-grid-create:focus-visible { opacity: 1; }
.booking-grid-create span { display: grid; width: 100%; height: 100%; place-items: center; transform: none; line-height: 1; }
.booking-grid-create:hover, .booking-grid-create:focus-visible { border-color: #2563eb; background: #dbeafe; color: #2563eb; }
.booking-create-submit { grid-column: 1; width: 100px; min-width: 100px; }
.booking-create-card { width: min(720px, calc(100vw - 32px)); }
.booking-create-slots { display: grid; gap: 8px; margin: 0; padding: 10px; border: 1px solid #dce3ee; border-radius: 8px; }
.booking-create-slots legend { padding: 0 4px; color: #51637b; font-size: 12px; }
.booking-create-slots-list { display: flex; flex-wrap: wrap; gap: 8px; }
.booking-create-slots-list label { position: relative; cursor: pointer; }
.booking-create-slots-list input { position: absolute; opacity: 0; }
.booking-create-slots-list span { display: block; min-width: 58px; padding: 8px 10px; border: 1px solid #d0d5dd; border-radius: 8px; color: #344054; text-align: center; }
.booking-create-slots-list input:checked + span { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; font-weight: 700; }
.booking-create-slots-empty { color: #667085; font-size: 13px; }
.booking-add-row { display: flex; justify-content: flex-start; }
.content:has(.booking-page) { overflow: visible; }

@media (max-width: 900px) {
  .booking-calendar-viewport { max-height: min(68dvh, calc(100dvh - 260px)); }
  .booking-calendar { width: max(100%, 940px); grid-template-columns: 54px repeat(7, minmax(126px, 1fr)); }
}

@media (max-width: 640px) {
  .booking-toolbar { align-items: stretch; }
  .booking-nav, .booking-filters { width: 100%; }
  .booking-nav strong { width: 100%; order: 2; }
  .booking-slot-settings { width: 100%; margin-left: 0; order: 3; flex-wrap: wrap; }
  .booking-slot-settings strong { width: 100%; }
  .booking-filters label { flex: 1 1 140px; }
  .booking-calendar-viewport { max-height: min(64dvh, calc(100dvh - 310px)); min-height: 280px; }
  .booking-calendar { width: max(100%, 870px); grid-template-columns: 50px repeat(7, minmax(117px, 1fr)); }
  .booking-day header { padding-inline: 7px; }
  .booking-day header strong { font-size: 16px; }
}
.primary { background: #4299e1; color: #fff; }
.primary:hover { background: #3182ce; }
.inline-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  align-self: end;
  min-height: 40px;
  width: max-content;
  border-radius: 7px;
  padding: 8px 14px;
  text-decoration: none;
  white-space: nowrap;
}
.auth-2fa-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 7px;
  padding: 8px 14px;
}
.ghost { background: #eef2f7; color: #172033; }
.ghost:hover { background: #e2e8f0; }
.btn-ghost-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #667085;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-ghost-secondary:hover {
  background-color: #f2f4f7;
  color: #344054;
}
.btn-ghost-secondary:focus-visible {
  outline: 2px solid #9cc3ff;
  outline-offset: 2px;
  background-color: #eaecf0;
}
.btn-ghost-secondary:active {
  background-color: #e4e7ec;
}
.btn-ghost-secondary:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  background-color: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  transition:
    color 0.15s ease-in-out,
    background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}

.btn-outline-secondary {
  color: #6b7280;
  background-color: transparent;
  border-color: #6b7280;
}

.btn-outline-secondary:hover {
  color: #ffffff;
  background-color: #6b7280;
  border-color: #6b7280;
}

.btn-outline-secondary:focus-visible {
  color: #ffffff;
  background-color: #6b7280;
  border-color: #6b7280;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(107, 114, 128, 0.25);
}

.btn-outline-secondary:active {
  color: #ffffff;
  background-color: #6b7280;
  border-color: #6b7280;
}

.btn-outline-secondary:disabled {
  color: #6b7280;
  background-color: transparent;
  border-color: #6b7280;
  opacity: 0.5;
  cursor: not-allowed;
}

.link-button { background: transparent; border: 0; color: #172033; cursor: pointer; font: inherit; font-weight: 700; padding: 0; text-align: left; }
.link-button:hover { color: #2563eb; text-decoration: underline; }
.copy-icon-button { display: inline-grid; width: 40px; min-width: 40px; height: 40px; min-height: 40px; padding: 8px; place-items: center; }
.copy-icon-button img { width: 20px; height: 20px; display: block; }
.danger, .client-delete-button { background: transparent; border: 1px solid #991b1b; color: #991b1b; }
.danger:hover, .client-delete-button:hover { background: #fee2e2; border-color: #fee2e2; color: #991b1b; }
.client-delete-icon-button { display: inline-grid; width: 40px; height: 40px; min-height: 40px; padding: 8px; place-items: center; border: 0; border-radius: 7px; background: transparent; }
.client-delete-icon-button:hover { background: #fee2e2; }
.modal-close-icon { display: inline-grid; width: 40px; height: 40px; min-width: 40px; min-height: 40px; padding: 8px; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #172033; cursor: pointer; }
.modal-close-icon:hover { background: #eef2f7; }
.modal-close-icon svg { display: block; width: 24px; height: 24px; }
.entity-list > div > .client-delete-icon-button { align-self: center; }
.client-delete-icon-button img { width: 24px; height: 24px; display: block; filter: brightness(0) saturate(100%) invert(19%) sepia(97%) saturate(3525%) hue-rotate(347deg) brightness(90%) contrast(91%); }
.visit-history-status { text-align: center; vertical-align: middle; font-weight: 500; }
.visit-history-status.is-completed { color: #16a34a; }
.visit-history-status.is-cancelled { color: #dc2626; }
.client-confirm-card { width: min(400px, calc(100vw - 32px)) !important; padding: 16px; }
.client-confirm-card p { margin: 10px 0 18px; }
.client-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.client-confirm-cancel { background: transparent; border: 1px solid #111827; color: #111827; }
.client-confirm-cancel:hover { background: #f3f4f6; }
.danger:hover { background: #fecaca; }

.password-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.field-error, .form-error { color: #b42318; }

.app {
  min-height: 100vh;
  display: block;
}

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 80;
  width: min(var(--sidebar-width), 88vw);
  overflow-y: auto;
  background: #111827;
  color: #fff;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 54px rgb(15 23 42 / 28%);
  transform: translateX(-100%);
  visibility: hidden;
  pointer-events: none;
  transition:
    transform .22s ease,
    visibility 0s linear .22s;
  will-change: transform;
}

.sidebar.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
}

.sidebar-toggle {
  border: 1px solid #dce3ee;
  border-radius: 10px;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 10px 28px rgb(30 41 59 / 10%);
  color: #172033;
}

.sidebar-toggle img { display: block; width: 21px; height: 21px; }

.brand { font-size: 20px; }
.sidebar select { background: #1f2937; color: #fff; border-color: #374151; }
.sidebar nav { display: grid; gap: 8px; margin-top: 10px; }
.sidebar a,
.sidebar-group-toggle {
  padding: 10px 12px;
  border-radius: 8px;
  color: #dbe4f0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
}

.sidebar a,
.sidebar-group-label {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sidebar-nav-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  filter: brightness(0) invert(1);
}

.sidebar-group-label {
  min-width: 0;
}
.sidebar a:hover,
.sidebar-group-toggle:hover { background: #1f2937; color: #fff; }

.sidebar-group {
  display: grid;
  gap: 6px;
}

.sidebar-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.sidebar-group.active .sidebar-group-toggle,
.sidebar-group-toggle.active,
.sidebar-submenu a.active {
  background: #1f2937;
  color: #fff;
}

.sidebar-group-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .18s ease;
}

.sidebar-group-toggle[aria-expanded="true"] .sidebar-group-chevron {
  transform: rotate(225deg);
}

.sidebar-submenu {
  display: grid;
  gap: 6px;
  padding-left: 12px;
}

.sidebar-submenu[hidden] {
  display: none;
}

.sidebar-submenu a {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

.content {
  min-width: 0;
  margin-left: 0;
  padding: 28px;
  display: grid;
  gap: 20px;
  align-content: start;
  transition: margin-left 0.22s ease;
}

.app.sidebar-open .content {
  margin-left: min(var(--sidebar-width), 88vw);
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.topbar-title {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.topbar span { color: #667085; font-size: 14px; line-height: 1.4; }
.topbar h1 { font-size: 28px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.span { grid-column: 1 / -1; }
.metric, .stat { padding: 18px; display: grid; gap: 10px; }
.metric span, .stat span { color: #667085; }
.metric b, .stat strong { font-size: 30px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }

.panel {
  padding: 22px;
  display: grid;
  gap: 18px;
}

.finance-page { display: grid; gap: 16px; }

.segmentation-page {
  display: grid;
  gap: 16px;
}

.segmentation-filter-panel {
  align-items: end;
}

.segmentation-filter-controls {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.segmentation-variable-control {
  display: grid;
  gap: 6px;
  color: #667085;
  font-size: 13px;
  font-weight: 500;
}

.segmentation-variable-select {
  position: relative;
}

.segmentation-variable-select summary {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #d5deec;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  cursor: pointer;
  list-style: none;
}

.segmentation-variable-select summary::-webkit-details-marker {
  display: none;
}

.segmentation-variable-select summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 1.5px solid #667085;
  border-bottom: 1.5px solid #667085;
  transform: rotate(45deg) translateY(-2px);
}

.segmentation-variable-select[open] summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.segmentation-variable-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  display: grid;
  gap: 4px;
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #dce3ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgb(30 41 59 / 18%);
}

.segmentation-variable-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 6px;
  color: #172033;
  cursor: pointer;
}

.segmentation-variable-option:hover {
  background: #eef5ff;
}

.segmentation-variable-option input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.segmentation-search {
  width: min(760px, 100%);
}

.segmentation-table {
  width: 100%;
  min-width: max(
    960px,
    calc(220px + var(--segment-variable-count, 1) * 170px)
  );
  table-layout: fixed;
}

.segmentation-table th:first-child,
.segmentation-table td:first-child {
  width: 220px;
}

.segmentation-table th,
.segmentation-table td {
  box-sizing: border-box;
  text-align: center;
  vertical-align: middle;
}

.segmentation-table .table-sort {
  width: 100%;
  min-height: 24px;
  justify-content: center;
}

[data-segmentation-table] {
  max-width: 100%;
  overflow-x: auto;
}

.segmentation-boolean {
  display: inline-flex;
  min-width: 42px;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.segmentation-boolean.is-true {
  background: #ecfdf3;
  color: #067647;
}

.segmentation-boolean.is-false {
  background: #fef3f2;
  color: #b42318;
}

.segmentation-pagination-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.segmentation-pagination,
.segmentation-page-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.segmentation-page-size {
  display: flex;
  align-items: center;
  gap: 8px;
}

.segmentation-error {
  margin: 0;
  color: #b42318;
}

@media (max-width: 820px) {
  .segmentation-filter-controls {
    grid-template-columns: 1fr;
  }

  .segmentation-filter-controls .primary {
    width: 100%;
  }

  .segmentation-pagination-controls {
    align-items: stretch;
    flex-direction: column;
  }
}

.finance-settings { display: grid; grid-template-columns: minmax(300px, .7fr) minmax(650px, 1.3fr); gap: 16px; }
.finance-settings-panel { display: grid; gap: 16px; align-content: start; }
.finance-plan-panel { border-color: #b9d6ff; background: #f8fbff; }
.finance-rules-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.finance-rules-head button { white-space: nowrap; }
.finance-plan-title { display: flex; align-items: center; gap: 10px; }
.finance-plan-title span { border-radius: 999px; background: #e5f0ff; padding: 4px 9px; color: #1769c2; font-size: 12px; font-weight: 600; }
.finance-rules-grid { display: grid; grid-template-columns: repeat(5, minmax(125px, 1fr)); gap: 10px; }
.finance-base-grid { grid-template-columns: repeat(2, minmax(125px, 1fr)); }
.finance-rules-grid label { display: grid; gap: 6px; color: #667085; font-size: 13px; font-weight: 500; }
.finance-rules-grid label > span { display: flex; align-items: center; min-height: 42px; border: 1px solid #dce3ee; border-radius: 8px; background: #fff; }
.finance-rules-grid input { min-width: 0; width: 100%; border: 0; box-shadow: none; }
.finance-rules-grid input:focus { outline: 0; box-shadow: none; }
.finance-rules-grid b { padding-right: 10px; color: #667085; font-size: 12px; white-space: nowrap; }
.finance-filter-panel { grid-template-columns: minmax(220px, .65fr) minmax(520px, 1.35fr); align-items: end; }
.finance-filters { display: grid; grid-template-columns: repeat(2, minmax(125px, .75fr)) repeat(2, minmax(155px, 1fr)) minmax(210px, 1.25fr) auto; gap: 10px; align-items: end; }
.finance-filters label { display: grid; gap: 6px; color: #667085; font-size: 13px; font-weight: 500; }
.finance-filters .primary { min-height: 42px; }
.finance-user-search { position: relative; }
.finance-user-results { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; left: 0; display: grid; max-height: 286px; overflow-y: auto; padding: 6px; border: 1px solid #dce3ee; border-radius: 8px; background: #fff; box-shadow: 0 14px 34px rgb(30 41 59 / 18%); }
.finance-user-results[hidden] { display: none; }
.finance-user-option { border: 0; border-radius: 6px; background: transparent; padding: 9px 10px; color: #172033; text-align: left; }
.finance-user-option:hover, .finance-user-option.is-selected { background: #eef5ff; color: #1769c2; }
.finance-user-empty { padding: 10px; color: #667085; font-weight: 400; }
.finance-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.finance-summary .stat strong { font-size: clamp(21px, 2vw, 29px); }
.finance-salary-stat { border-color: #b9d6ff; background: #f4f8ff; }
.finance-salary-stat strong, .finance-salary-cell { color: #1769c2; }
.finance-table-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.finance-table-head span { color: #667085; }
.finance-table { min-width: 860px; }
.finance-table td small { display: block; margin-top: 3px; color: #98a2b3; }
.finance-table tr.is-inactive { opacity: .62; }
.finance-salary-cell { font-weight: 600; }


.finance-expenses-page {
  display: grid;
  gap: 16px;
}


.finance-expenses-panel {
  display: grid;
  gap: 16px;
}


.finance-expenses-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}


.finance-expenses-head h2 {
  margin: 0;
}


.finance-expenses-form {
  display: grid;
  grid-template-columns:
    220px
    130px
    130px
    130px
    130px
    auto;
  gap: 10px;
  align-items: end;
  justify-content: start;
}


.finance-expenses-form label {
  display: grid;
  gap: 6px;

  color: #667085;
  font-size: 13px;
  font-weight: 500;
}


.finance-expenses-form input {
  width: 100%;
  min-width: 0;
}

.finance-expense-name-field {
  width: 220px;
}

.finance-expense-amount-field {
  width: 130px;
}


.finance-expenses-form
.standard-save-button {
  min-height: 40px;
  justify-self: start;
}


.finance-expenses-message {
  min-height: 18px;
  margin: 0;

  color: #667085;
  font-size: 13px;
}


.finance-expenses-table {
  width: 100%;
}


.finance-expenses-table th,
.finance-expenses-table td {
  vertical-align: middle;
}


.finance-expenses-actions {
  width: 56px;
  text-align: center;
}


.finance-plan-toggle { min-width: 112px; padding: 7px 10px; white-space: nowrap; }
.finance-plan-actions { display: grid; gap: 6px; min-width: 176px; }
.finance-plan-actions button { width: 100%; padding: 7px 10px; white-space: nowrap; }
.finance-plan-head-actions { display: flex; gap: 8px; }
.finance-additional-assignment { display: grid; gap: 4px; color: #667085; font-size: 12px; font-weight: 500; }
.finance-additional-assignment select { min-width: 176px; width: 100%; }
.finance-additional-modal { width: min(1220px, 100%); }
.finance-additional-list { display: grid; gap: 14px; }
.finance-additional-card { display: grid; gap: 10px; border: 1px solid #c7d7ee; border-radius: 10px; background: #f8fbff; padding: 12px; }
.finance-additional-card-head { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.finance-additional-card-head label { display: grid; flex: 1; gap: 6px; color: #667085; font-size: 13px; font-weight: 500; }
.finance-additional-rule-add { justify-self: start; }
.finance-additional-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 4px; border-top: 1px solid #e5e7eb; }
.finance-individual-modal { width: min(1180px, 100%); }
.finance-individual-note { border: 1px solid #c4b5fd; border-radius: 8px; background: #f5f3ff; padding: 10px 12px; color: #5b21b6; }
.finance-individual-rules { display: grid; gap: 10px; }
.finance-individual-rule { display: grid; grid-template-columns: 1.6fr .65fr 1fr 1.35fr .8fr auto; gap: 8px; align-items: end; border: 1px solid #dce3ee; border-radius: 9px; background: #f8fafc; padding: 10px; }
.finance-individual-rule label { display: grid; gap: 6px; min-width: 0; color: #667085; font-size: 13px; font-weight: 500; }
.finance-individual-rule select, .finance-individual-rule input { width: 100%; min-width: 0; }
.finance-individual-percent { display: flex; align-items: center; border: 1px solid #dce3ee; border-radius: 8px; background: #fff; }
.finance-individual-percent input { border: 0; box-shadow: none; }
.finance-individual-percent b { padding-right: 9px; color: #667085; }
.finance-individual-remove { min-height: 42px; padding: 8px 11px; }
.finance-individual-add-row, .finance-individual-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.finance-individual-add-row span { color: #667085; font-size: 12px; }
.finance-individual-footer { padding-top: 4px; border-top: 1px solid #e5e7eb; }
.finance-empty { padding: 36px 16px; text-align: center; color: #667085; }
.breakdown-filters { grid-template-columns: repeat(2, minmax(135px, .8fr)) repeat(3, minmax(165px, 1fr)) auto; }
.breakdown-table { min-width: 1120px; }
.breakdown-type { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #eef5ff; color: #1769c2; font-size: 12px; font-weight: 600; }
.breakdown-table td { vertical-align: middle; }

@media (max-width: 1100px) {
  .finance-filter-panel, .finance-settings { grid-template-columns: 1fr; }
  .finance-filters { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .breakdown-filters { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .finance-rules-grid { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
  .finance-base-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .finance-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .finance-filters, .breakdown-filters, .finance-summary, .finance-rules-grid, .finance-base-grid { grid-template-columns: 1fr; }
  .finance-table-head, .finance-rules-head { align-items: start; flex-direction: column; }
  .finance-rules-head button { width: 100%; }
  .finance-plan-head-actions, .finance-additional-card-head, .finance-additional-footer { align-items: stretch; flex-direction: column; width: 100%; }
  .finance-additional-card-head button:not(.client-delete-icon-button), .finance-additional-footer button:not(.client-delete-icon-button) { width: 100%; }
  .finance-individual-rule { grid-template-columns: 1fr; }
  .finance-individual-add-row, .finance-individual-footer { align-items: stretch; flex-direction: column; }
  .finance-individual-footer button:not(.client-delete-icon-button) { width: 100%; }
}

.subpanel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e3e8f1;
  border-radius: 10px;
  background: #fff;
}

.notification-compose-heading { display: flex; align-items: center; gap: 6px; }
.notification-compose-heading .subpanel-title { margin: 0; }
.notification-compose-clear { display: inline-grid; width: 24px; height: 24px; min-height: 24px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #dc2626; font-size: 22px; line-height: 1; cursor: pointer; }
.notification-compose-clear:hover { background: #fee2e2; }

.subpanel-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
}

.title-hint {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid #cfd7e6;
  border-radius: 50%;
  color: #667085;
  cursor: help;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.title-hint::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 10;
  width: max-content;
  max-width: 280px;
  padding: 8px 10px;
  border-radius: 7px;
  background: #111827;
  color: #fff;
  content: attr(data-tooltip);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity .15s ease, transform .15s ease;
}

.title-hint:hover::after,
.title-hint:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.entity-list {
  display: grid;
  gap: 10px;
}

.entity-card {
  min-height: auto;
  border: 1px solid #e3e8f1;
  background: #f8fbff;
  border-radius: 12px;
  color: #172033;
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  text-align: left;
}

.entity-card:hover {
  background: #eef6ff;
  border-color: #9cc3ff;
}

.entity-card b {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.entity-card span {
  color: #667085;
  font-size: 14px;
  line-height: 1.4;
}

.simple-list {
  display: grid;
  gap: 8px;
}

.simple-list div {
  border: 1px dashed #cfd7e6;
  border-radius: 8px;
  color: #465266;
  padding: 10px 12px;
  background: #fafcff;
}

.permission-card {
  display: grid;
  gap: 12px;
  border: 1px solid #dce3ee;
  border-radius: 8px;
  padding: 12px;
  background: #fafcff;
}

.permission-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.permission-card-head h4,
.permission-service h5 {
  margin: 0;
}

.permission-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}

.permission-service {
  display: grid;
  gap: 10px;
  border: 1px solid #e3e8f2;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.permission-section {
  display: grid;
  gap: 6px;
}

.permission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.achievement-builder {
  display: grid;
  gap: 10px;
  border: 1px solid #dce3ee;
  border-radius: 8px;
  padding: 12px;
  background: #fafcff;
}

.achievement-builder-head,
.achievement-condition-row {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.achievement-builder-head {
  justify-content: space-between;
  align-items: center;
}

.product-add-amount {
  justify-self: start;
}

.achievement-conditions {
  display: grid;
  gap: 10px;
}

.achievement-condition-row label {
  min-width: 180px;
  flex: 1 1 180px;
}

[data-achievement-condition-row] > label:first-child {
  min-width: 0;
  flex: 0 1 250px;
}

[data-achievement-condition-controls] {
  display: flex;
  flex: 0 1 510px;
  gap: 10px;
}

[data-achievement-condition-controls] > label {
  min-width: 0;
  flex: 0 1 250px;
}

.branch-multiselect {
  display: grid;
  gap: 6px;
  position: relative;
}

.branch-multiselect > span {
  font-size: 13px;
  color: #344054;
}

.branch-multiselect-dropdown {
  position: relative;
}

.branch-multiselect-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 9px 36px 9px 12px;
  border: 1px solid #cfd8e6;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  list-style: none;
}

.branch-multiselect-dropdown summary::-webkit-details-marker {
  display: none;
}

.branch-multiselect-dropdown summary::after {
  content: "⌄";
  position: absolute;
  right: 12px;
  color: #667085;
}

[data-department-branch-select] .branch-multiselect-dropdown summary::after {
  content: "";
  width: 7px;
  height: 7px;
  right: 14px;
  border-right: 1.5px solid #667085;
  border-bottom: 1.5px solid #667085;
  transform: rotate(45deg) translateY(-3px);
}

.branch-multiselect-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  border: 1px solid #cfd8e6;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tabs a {
  position: relative;
  overflow: hidden;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #d7dce5;
  background: transparent;
  color: #172033;
  font-weight: 500;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.tabs a:hover,
.tabs button:hover {
  transform: translateY(-1px);
  background: #f2f4f7;
  border-color: #111827;
  color: #172033;
}

.tabs a.active {
  background: #1f2937;
  border-color: #1f2937;
  color: #fff;
}

.tabs button {
  position: relative;
  overflow: hidden;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #d7dce5;
  background: transparent;
  color: #172033;
  font-weight: 500;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.tabs button.active {
  background: #1f2937;
  border-color: #1f2937;
  color: #fff;
}

.tabs a.loyalty-tab-button {
  padding: 9px 16px;
  border: 1px solid #4299e1;
  border-radius: 6px;
  background-color: transparent;
  color: #4299e1;
  text-decoration: none;
  transform: none;
  transition:
    background-color .15s ease,
    border-color .15s ease,
    color .15s ease;
}

.tabs a.loyalty-tab-button:hover {
  background-color: #4299e1;
  border-color: #4299e1;
  color: #ffffff;
  transform: none;
}

.tabs a.loyalty-tab-button.is-active {
  background-color: #4299e1;
  border-color: #4299e1;
  color: #ffffff;
}

.tabs a.loyalty-tab-button.is-active:hover {
  background-color: #4299e1;
  border-color: #4299e1;
  color: #ffffff;
  transform: none;
}
.subpanel table .actions { vertical-align: middle; }
.warehouse-actions-popover { position: relative; display: inline-flex; }
.warehouse-actions-settings { display: inline-grid; width: 40px; min-width: 40px; height: 40px; min-height: 40px; padding: 8px; place-items: center; border: 0; border-radius: 7px; background: transparent; }
.warehouse-actions-settings:hover { background: #eef2f7; }
.warehouse-actions-settings img { display: block; width: 24px; height: 24px; }
.warehouse-actions-menu { position: absolute; z-index: 20; top: 0; right: calc(100% - 1px); display: none; gap: 8px; min-width: max-content; padding: 8px; border: 1px solid #dce3ee; border-radius: 8px; background: #fff; box-shadow: 0 10px 24px rgb(16 24 40 / 16%); }
.warehouse-actions-popover:hover .warehouse-actions-menu, .warehouse-actions-popover:focus-within .warehouse-actions-menu, .warehouse-actions-popover.is-open .warehouse-actions-menu { display: flex; }
.warehouse-actions-menu .client-delete-button { white-space: nowrap; }
.warehouse-subdivision-actions { width: 56px; min-width: 56px; text-align: right; }
.warehouse-subdivision-actions .client-delete-icon-button { margin-left: auto; }
.warehouse-storage-actions { width: 56px; min-width: 56px; text-align: right; }
.warehouse-storage-actions .warehouse-actions-popover { margin-left: auto; }

[data-storage-table-row] { cursor: pointer; }
[data-storage-table-row] .warehouse-storage-actions { cursor: default; }
[data-storage-product-edit] { cursor: pointer; }

.warehouse-subdivision-popover {
  position: relative;
  display: inline-flex;
}

.warehouse-subdivision-popover.is-open,
.warehouse-subdivision-popover:focus-within {
  z-index: 40;
}

.warehouse-subdivision-popover.is-open
.warehouse-subdivision-menu,
.warehouse-subdivision-popover:focus-within
.warehouse-subdivision-menu {
  z-index: 50;
}

.warehouse-subdivision-table-wrap {
  overflow: visible;
}

.warehouse-subdivision-table-wrap > table {
  border-radius: inherit;
}

.warehouse-subdivision-trigger {
  position: relative;
  z-index: 1;
}

.warehouse-subdivision-menu {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;

  display: none;
  width: 320px;
  gap: 16px;
  padding: 14px;

  border: 1px solid #dce3ee;
  border-radius: 10px;

  background: #fff;

  box-shadow:
    0 10px 24px rgb(16 24 40 / 16%);
}

.warehouse-subdivision-menu::before {
  content: "";
  position: absolute;
  top: -20px;
  bottom: -20px;
  left: -24px;
  width: 28px;
}

.warehouse-subdivision-popover.is-open
.warehouse-subdivision-menu,
.warehouse-subdivision-popover:focus-within
.warehouse-subdivision-menu {
  display: grid;
}

.warehouse-subdivision-inline-edit {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.warehouse-subdivision-inline-edit label,
.warehouse-subdivision-inline-edit input {
  width: 100%;
  min-width: 0;
}

.warehouse-subdivision-inline-edit
.standard-save-button {
  justify-self: start;
}

.warehouse-storage-filters {
  display: flex;
  align-items: end;
  gap: 8px;
  margin: 4px 0 12px;
  flex-wrap: wrap;
}

.warehouse-storage-filter {
  display: grid;
  width: min(280px, 100%);
  gap: 4px;
  color: #667085;
  font-size: 12px;
  font-weight: 500;
}

.warehouse-storage-filter .branch-multiselect-dropdown { width: 100%; }
.warehouse-storage-filter .branch-multiselect-options { min-width: 100%; }
.warehouse-storage-filter .branch-multiselect-options label.checkbox {
  display: inline-flex;
  width: 100%;
  align-items: center;
}

.warehouse-subdivision-menu-storages {
  display: grid;
  gap: 6px;
}

.warehouse-subdivision-menu-storages > strong {
  color: #172033;
  font-size: 13px;
  font-weight: 600;
}

.warehouse-subdivision-storage-popover {
  position: relative;
}

.warehouse-subdivision-storage-trigger {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;

  min-height: 40px;
  padding: 8px 10px;

  border: 0;
  border-radius: 7px;

  background: transparent;
  color: #172033;

  text-align: left;
  cursor: pointer;
}

.warehouse-subdivision-storage-trigger:hover,
.warehouse-subdivision-storage-popover:focus-within
.warehouse-subdivision-storage-trigger {
  background: #f7f9fc;
}

.warehouse-subdivision-storage-trigger > span {
  min-width: 0;
  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-subdivision-storage-trigger > small {
  margin: 0;

  color: #667085;
  font-size: 12px;
  white-space: nowrap;
}

.warehouse-subdivision-storage-menu {
  position: fixed;
  z-index: 1010;
  top: 0;
  left: 0;

  display: none;
  width: 280px;
  height: auto;
  max-height: none;
  overflow: visible;

  padding: 8px;

  border: 1px solid #dce3ee;
  border-radius: 10px;

  background: #fff;

  box-shadow:
    0 10px 24px rgb(16 24 40 / 16%);
}

.warehouse-subdivision-storage-menu::before {
  content: "";
  position: absolute;
  top: -20px;
  bottom: -20px;
  left: -24px;
  width: 28px;
}

.warehouse-subdivision-storage-popover.is-open
.warehouse-subdivision-storage-menu,
.warehouse-subdivision-storage-popover:focus-within
.warehouse-subdivision-storage-menu {
  display: block;
  z-index: 1010;
}

.warehouse-subdivision-storage-popover.is-open,
.warehouse-subdivision-storage-popover:focus-within {
  z-index: 60;
}

.warehouse-subdivision-products-list {
  display: grid;
  width: 100%;
  height: auto;
  gap: 2px;
}

.warehouse-subdivision-storage-menu,
.warehouse-subdivision-products-list {
  min-width: 0;
  box-sizing: border-box;
}

.warehouse-subdivision-product {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;

  min-height: 38px;
  padding: 8px 10px;

  border: 0;
  border-radius: 7px;

  background: transparent;
  color: #172033;

  text-align: left;
  cursor: pointer;
}

.warehouse-subdivision-product:hover {
  background: #f7f9fc;
}

.warehouse-subdivision-product > span {
  min-width: 0;
  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-subdivision-product > small {
  margin: 0;

  color: #667085;
  font-size: 12px;
  white-space: nowrap;
}

.warehouse-subdivision-empty,
.warehouse-subdivision-products-loading {
  margin: 0;
  padding: 8px 10px;

  color: #667085;
  font-size: 13px;
}

.modal-card.warehouse-writeoff-modal {
  width: min(420px, calc(100vw - 48px));
}

.modal-grid.warehouse-writeoff-form {
  width: 100%;
  grid-template-columns: 1fr;
  gap: 12px;
}

.warehouse-writeoff-form > * {
  min-width: 0;
}

.warehouse-writeoff-form label {
  width: 100%;
}

.warehouse-writeoff-form select,
.warehouse-writeoff-form input {
  width: 100%;
  box-sizing: border-box;
}

.warehouse-writeoff-storage {
  color: #667085;
  font-size: 13px;
}

.warehouse-writeoff-form
[data-storage-writeoff-available] {
  min-height: 18px;
  color: #667085;
  font-size: 12px;
}

.warehouse-writeoff-comment-label {
  display: grid;
  gap: 4px;
}

.warehouse-writeoff-form .warehouse-writeoff-comment {
  width: 100%;
  max-width: none !important;
}

.warehouse-writeoff-form .warehouse-writeoff-comment textarea {
  width: 100%;
  height: 112px;
  min-height: 112px;
  max-height: 240px;
  box-sizing: border-box;
  resize: vertical;
}

.warehouse-storage-name {
  display: grid;
  justify-items: start;
  gap: 2px;
}

.warehouse-storage-name strong {
  color: #172033;
  font-weight: 600;
  line-height: 1.4;
}

.warehouse-storage-subdivision {
  color: #667085;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
}

[data-storage-table-sort] {
  width: 100%;
}
.warehouse-product-results { display: grid; gap: 8px; max-height: 280px; overflow: auto; }
.warehouse-product-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 100px; gap: 8px; align-items: center; min-width: 0; }
.warehouse-transfer-title-storage {
  margin-left: 24px;
  color: inherit;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.warehouse-transfer-form {
  display: grid;
  gap: 12px;
}

.warehouse-transfer-fields {
  display: grid;
  grid-template-columns:
    minmax(260px, 360px)
    minmax(360px, 1fr);
  gap: 28px;
  align-items: end;
}

.warehouse-transfer-fields label {
  display: grid;
  min-width: 0;
  gap: 6px;

  color: #667085;
  font-size: 13px;
  font-weight: 500;
}

.warehouse-transfer-fields select,
.warehouse-transfer-fields input {
  width: 100%;
  min-width: 0;
  height: 36px;
  box-sizing: border-box;
}

.warehouse-transfer-search-label {
  visibility: hidden;
}

.warehouse-transfer-content {
  display: grid;
  grid-template-columns:
    minmax(260px, 360px)
    minmax(360px, 1fr);
  gap: 28px;
  align-items: start;
}

.warehouse-transfer-controls {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.warehouse-transfer-products {
  min-width: 0;
}

.warehouse-transfer-submit {
  width: auto;
  min-width: 128px;
  max-width: none;
  padding: 8px 16px;
  flex: 0 0 auto;
  white-space: nowrap;
}
.product-storage-multiselect { position: relative; }
.product-storage-multiselect summary { min-height: 40px; padding: 10px 12px; border: 1px solid #dce3ee; border-radius: 8px; background: #fff; cursor: pointer; }
.product-storage-multiselect[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.product-storage-multiselect .achievement-conditions { padding: 10px; border: 1px solid #dce3ee; border-top: 0; border-radius: 0 0 8px 8px; background: #fff; }
.product-storage-select-row { grid-template-columns: minmax(0, 1fr) minmax(120px, .6fr); }
.product-storage-select-row input[type="checkbox"] { width: 14px; min-width: 14px; height: 14px; margin: 0 6px 0 0; vertical-align: middle; }
@media (max-width: 640px) { .warehouse-create-form { grid-template-columns: 1fr; } .warehouse-product-row { grid-template-columns: auto minmax(0, 1fr); } .warehouse-actions-menu { right: 0; top: 100%; } }
.loyalty-rules-section table .loyalty-rule-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
  align-items: center;
}
.loyalty-rules-section table .loyalty-rule-row > td:first-child { grid-column: 1 / 6; }
.loyalty-rules-section table .loyalty-rule-row > .actions {
  grid-column: 6;
  padding: 10px 0;
  text-align: left;
}
.loyalty-transition-rules-section table .loyalty-transition-rule-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
  column-gap: 12px;
  align-items: center;
}
.loyalty-transition-rules-section table .loyalty-transition-rule-row > td:nth-child(1) { grid-column: 1 / 3; }
.loyalty-transition-rules-section table .loyalty-transition-rule-row > td:nth-child(2) { grid-column: 3 / 4; }
.loyalty-transition-rules-section table .transition-rule-actions { grid-column: 4; }
.loyalty-transition-rules-section .loyalty-transition-create {
  width: 160px;
  min-width: 160px;
  max-width: none;
  height: 40px;
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
  justify-self: start;
}
.loyalty-rules-section form[data-loyalty-rule-create] > button.primary,
form[data-loyalty-edit-form][data-kind="rule"] > button.primary {
  width: 160px;
  min-width: 160px;
  height: 40px;
  min-height: 40px;
  padding: 8px 14px;
  white-space: nowrap;
  justify-self: start;
}
.loyalty-transition-rules-section [data-apply-rule-all] {
  width: max-content;
  min-width: max-content;
  height: 40px;
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
}
.loyalty-transition-rules-section table .loyalty-transition-rule-row > .actions {
  grid-column: 6;
  padding: 10px 0;
  text-align: left;
}
.loyalty-rule-actions-popover { position: relative; display: inline-flex; }
.loyalty-rule-settings { display: inline-grid; width: 40px; height: 40px; min-height: 40px; padding: 8px; place-items: center; border: 0; border-radius: 7px; background: transparent; }
.loyalty-rule-settings:hover { background: #eef2f7; }
.loyalty-rule-settings img { width: 24px; height: 24px; display: block; }
.loyalty-rule-actions-menu { position: absolute; z-index: 20; top: 0; right: calc(100% - 1px); display: none; gap: 8px; min-width: max-content; padding: 8px; border: 1px solid #dce3ee; border-radius: 8px; background: #fff; box-shadow: 0 10px 24px rgb(16 24 40 / 16%); }
.loyalty-rule-actions-popover:hover .loyalty-rule-actions-menu,
.loyalty-rule-actions-popover:focus-within .loyalty-rule-actions-menu { display: flex; }
.loyalty-rule-actions-popover.is-open .loyalty-rule-actions-menu { display: flex; }
.loyalty-rule-actions-menu .client-delete-button { white-space: nowrap; }

.compact-tabs {
  margin: 0;
}

.tabs .tab-disabled {
  padding: 8px 12px;
  border-radius: 7px;
  background: #eef2f7;
  color: #98a2b3;
  cursor: default;
  user-select: none;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.inline-form.compact {
  grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
}
.catalog-excel-actions { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.catalog-excel-actions > label:first-child { display: grid; gap: 6px; min-width: 230px; color: #667085; font-size: 14px; font-weight: 500; }
.catalog-excel-upload, .catalog-excel-export { min-height: 40px; box-sizing: border-box; }
.catalog-excel-upload { position: relative; cursor: pointer; }
.catalog-excel-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.catalog-excel-preview { position:fixed; inset:0; z-index:110; display:grid; place-items:center; padding:24px; background:rgb(15 23 42 / 45%); }
.catalog-excel-preview[hidden] { display:none; }
.catalog-excel-preview-card { width:min(720px, 100%); max-height:calc(100vh - 48px); }
.catalog-excel-preview-footer { display:flex; justify-content:flex-end; }
.catalog-excel-preview-list { display:grid; gap:4px; max-height:260px; overflow-y:auto; }
.catalog-excel-preview-list > div { display:grid; grid-template-columns:minmax(0,1fr) minmax(90px,.45fr) auto; align-items:center; gap:8px; padding:5px 7px; border-radius:6px; background:#fff; }
.catalog-excel-preview-list span,.catalog-excel-preview-list small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.catalog-excel-preview-list small { color:#667085; }
.catalog-excel-upload.is-disabled { opacity: .5; cursor: not-allowed; }
.catalog-excel-export { text-decoration: none; }
[data-product-excel-message] { align-self: center; color: #667085; }

[data-notifications] .inline-form {
  align-items: start;
}

[data-notifications] .wide,
[data-notifications] [data-message] {
  grid-column: 1 / -1;
}

[data-notifications] .notification-title-field,
[data-notifications] .notification-message-field,
[data-notifications] .notification-channels-field {
  max-width: 50%;
}

.notification-channels-select { position: relative; width: max-content; max-width: 100%; }
.notification-channels-trigger { display: inline-flex; align-items: center; gap: 7px; width: auto; min-height: 30px; padding: 4px 7px; border: 0; border-radius: 9px; background: transparent; color: #667085; cursor: pointer; }
.notification-channels-trigger:hover,
.notification-channels-select.is-open .notification-channels-trigger { background: #f2f4f7; color: #172033; }
.notification-channels-trigger span { font-size: 12px; font-weight: 600; }
.notification-channels-trigger svg { width: 17px; height: 17px; flex: 0 0 17px; transition: transform .18s ease; }
.notification-channels-trigger:hover svg,
.notification-channels-select.is-open .notification-channels-trigger svg { transform: translate(2px, -2px); }
.notification-channels-options { position: absolute; z-index: 40; bottom: calc(100% - 1px); left: 0; display: none; width: 220px; gap: 4px; padding: 8px; border: 1px solid #d0d5dd; border-radius: 10px; background: rgb(255 255 255 / 96%); box-shadow: 0 12px 26px rgb(16 24 40 / 14%); backdrop-filter: blur(12px); }
.notification-channels-select:hover .notification-channels-options,
.notification-channels-select:focus-within .notification-channels-options,
.notification-channels-select.is-open .notification-channels-options { display: grid; }
.notification-channels-options label { min-height: 36px; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.notification-channels-options label:hover { background: #f2f4f7; }
.notification-channels-options input { width: 17px; height: 17px; margin: 0; accent-color: #4299e1; }
.notification-channels-options .notification-single-delivery { align-items: flex-start; margin-top: 4px; padding-top: 10px; border-top: 1px solid #e4e7ec; line-height: 1.35; }
.notification-history { display: grid; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid #e4e7ec; }
.notification-history-list { display: grid; gap: 10px; }
.notification-history-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid #dce3ee; border-radius: 10px; background: #f8fafc; }
.notification-history-content { display: grid; flex: 1; min-width: 0; gap: 5px; }
.notification-history-content > p { margin: 0; white-space: pre-wrap; color: #475467; }
.notification-history-meta { display: flex; gap: 8px; color: #667085; font-size: 13px; }
.notification-history-meta .is-completed { color: #16a34a; font-weight: 700; }
.notification-history-images { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 3px; }
.notification-history-images img { width: 58px; height: 58px; object-fit: cover; border: 1px solid #dce3ee; border-radius: 7px; }
.notification-history-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 2px; }
.notification-history-empty { margin: 0; color: #667085; }

[data-notifications] .notification-title-field input {
  width: 100%;
}

.notification-title-field {
  width: min(320px, 100%);
  max-width: 320px !important;
  transition: width .4s cubic-bezier(.175, .885, .32, 1.275), max-width .4s cubic-bezier(.175, .885, .32, 1.275);
}

.notification-title-field.is-expanded {
  width: min(960px, 100%);
  max-width: 960px !important;
}

.notification-title-field input {
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(16 24 40 / 4%);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.notification-title-field input:focus {
  border-color: rgb(17 24 39 / 45%);
  outline: none;
  box-shadow: 0 0 0 2px rgb(17 24 39 / 8%), 0 10px 26px rgb(16 24 40 / 8%);
}

[data-notifications] textarea {
  width: 100%;
  min-height: 48px;
  resize: none;
}

.notification-message-field {
  display: grid;
  width: min(320px, 100%);
  max-width: 320px !important;
  overflow: hidden;
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(16 24 40 / 4%);
  transition: width .4s cubic-bezier(.175, .885, .32, 1.275), max-width .4s cubic-bezier(.175, .885, .32, 1.275);
}

.notification-message-field.is-expanded {
  width: min(960px, 100%);
  max-width: 960px !important;
  overflow: visible;
  border-color: rgb(17 24 39 / 45%);
  box-shadow: 0 0 0 2px rgb(17 24 39 / 8%), 0 10px 26px rgb(16 24 40 / 8%);
}

.notification-message-field textarea {
  display: block;
  width: 100%;
  height: 48px;
  min-height: 48px;
  max-height: 400px;
  overflow-y: auto;
  padding: 13px 16px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  line-height: 20px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  outline: none;
  box-shadow: none;
  transition: height .4s cubic-bezier(.175, .885, .32, 1.275);
}

.notification-message-field textarea:focus {
  outline: none;
  box-shadow: none;
}

.notification-image-previews {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 4px 8px 8px;
}
.notification-image-previews[hidden] { display: none; }
.notification-image-previews figure { position: relative; min-width: 0; margin: 0; }
.notification-image-previews img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.notification-image-previews button { position: absolute; top: 4px; right: 4px; display: grid; width: 22px; height: 22px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: rgb(17 24 39 / 78%); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; }

.notification-composer-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  max-height: 0;
  overflow: hidden;
  padding: 0 8px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: max-height .35s cubic-bezier(.175, .885, .32, 1.275), padding .35s ease, opacity .2s ease, transform .35s cubic-bezier(.175, .885, .32, 1.275);
}

.notification-message-field.is-expanded .notification-composer-toolbar {
  max-height: 48px;
  overflow: visible;
  padding: 4px 8px 8px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 900px) {
  [data-notifications] .notification-message-field {
    max-width: 100%;
  }

  [data-notifications] .notification-title-field {
    max-width: 100%;
  }
  [data-notifications] .notification-channels-field {
    max-width: 100%;
  }
}

[data-notification-counter] {
  align-self: center;
  color: #667085;
}

.notification-counter,
.notification-channels-field,
.notification-recipient-count,
.notification-submit,
.notification-config-warning {
  grid-column: 1 / -1;
  justify-self: start;
}

.notification-counter,
.notification-recipient-count,
.notification-config-warning { margin: 0; }
.notification-channels-field { width: max-content; max-width: 100%; }
.notification-composer-toolbar .notification-counter { margin-left: 2px; font-size: 11px; }
.notification-composer-toolbar .notification-attach {
  display: inline-grid;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  margin-left: auto;
  padding: 0;
  border: 0;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: #111827;
  cursor: pointer;
  transition: background-color .2s ease;
}
.notification-composer-toolbar .notification-attach:hover { background: #eef2f7; }
.notification-composer-toolbar .notification-submit {
  display: inline-grid;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  margin-left: 0;
  padding: 0;
  place-items: center;
  border-radius: 50%;
}
.notification-composer-toolbar .notification-submit svg { width: 18px; height: 18px; }

.event-row-create > td:first-child > button,
.event-row-client-create > td:first-child > button,
.event-client-create-button,
.event-row-complete > td:first-child > button,
.event-row-cancel > td:first-child > button,
.event-row-review > td:first-child > button {
  width: 150px;
  min-width: 150px;
  box-sizing: border-box;
  text-align: center;
}
.event-row-create > td:first-child > button { border-color: #d0d5dd; background: #f2f4f7; }
.event-row-client-create > td:first-child > button,
.event-client-create-button { border: 1px solid #86efac !important; background: transparent !important; }
.event-row-complete > td:first-child > button { border-color: #86efac; background: #dcfce7; }
.event-row-cancel > td:first-child > button { border-color: #fca5a5; background: #fee2e2; }
.event-row-storage > td:first-child > button { border-color: #f59f00; background: #f59f00; color: #fff; }
.storage-event-button { border-color: #f59f00 !important; background: #f59f00 !important; color: #fff !important; }
.event-row-review > td:first-child > button { border-color: #facc15; background: #fef3c7; }

.product-create-submit {
  grid-column: 1;
  justify-self: start;
}

.visit-form {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  align-items: start;
}

.visit-form label {
  align-self: start;
}

.visit-form .field-error {
  min-height: 14px;
  font-size: 12px;
  line-height: 14px;
  margin-top: -2px;
}

.visit-form label:first-child {
  grid-column: span 2;
}

.visit-form input[type="datetime-local"] {
  min-width: 0;
  width: 100%;
}

.visit-form .visit-item-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.service-staff-editor { position: relative; display: grid; gap: 10px; }
.service-image-album { display: grid; gap: 10px; }
.visit-photo-album { display: grid; gap: 10px; }
.service-image-album-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.service-image-album-head small { color: #667085; }
.service-image-previews { display: flex; flex-wrap: wrap; gap: 10px; }
.service-image-preview { position: relative; display: grid; gap: 6px; width: 110px; margin: 0; }
.service-image-preview > img { width: 110px; height: 90px; object-fit: cover; border: 1px solid #dce3ee; border-radius: 8px; background: #f8fafc; }
.service-image-preview button { padding: 5px 7px; font-size: 12px; }
.service-image-preview .client-delete-icon-button { padding: 8px; }
.service-image-preview .client-delete-icon-button img { width: 24px; height: 24px; border: 0; background: transparent; }
.service-image-preview .service-image-remove-button {
  position: absolute;
  z-index: 2;
  top: 6px;
  right: 6px;
  display: inline-grid;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 92%);
  color: #dc2626;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgb(15 23 42 / 22%);
}
.service-image-preview .service-image-remove-button:hover {
  background: #fee2e2;
  color: #b91c1c;
}
.service-image-preview .service-image-remove-button:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}
.service-staff-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.service-staff-editor-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.service-staff-filter, .service-staff-enabled { display: inline-flex !important; align-items: center; gap: 6px; margin: 0 !important; cursor: pointer; }
.service-staff-filter input, .service-staff-enabled input { width: 17px; height: 17px; margin: 0; }
.service-staff-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid #e4e7ec; border-radius: 8px; }
.service-staff-table { width: 100%; min-width: 950px; border-collapse: collapse; background: #fff; }
.service-staff-table th, .service-staff-table td { padding: 9px; border-bottom: 1px solid #e3e8f1; text-align: left; vertical-align: middle; }
.service-staff-table th { background: #fafbfd; color: #667085; font-size: 13px; font-weight: 500; white-space: nowrap; }
.service-staff-table tbody tr:last-child td { border-bottom: 0; }
.service-staff-row { transition: opacity .15s ease, background-color .15s ease; }
.service-staff-row.is-disabled { background: #f8fafc; opacity: .55; }
.service-staff-row[hidden] { display: none; }
.service-staff-row td > input { width: 100%; min-width: 105px; }
.service-staff-row strong { display: block; min-width: 150px; }
.service-duration-inputs { display: flex !important; align-items: center; gap: 5px; margin: 0 !important; }
.service-duration-inputs input { width: 54px; min-width: 0; }
.service-duration-inputs i { font-size: 12px; font-style: normal; color: #667085; }

.visit-form .visit-selected-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

form[data-visit-edit] .visit-selected-item {
  display: flex;
  width: 320px;
  max-width: 100%;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 4px 8px;
  border: 1px solid #cfd7e6;
  border-radius: 7px;
  box-sizing: border-box;
}

.visit-form .visit-selected-item span {
  flex: 1 1 auto;
  min-width: 0;
}

form[data-visit-edit] .visit-selected-item span {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}
form[data-visit-edit] .visit-selected-item input {
  flex: 0 0 54px;
  width: 54px;
  min-width: 54px;
}
form[data-visit-edit] .visit-selected-item .client-delete-icon-button {
  flex: 0 0 40px;
}

.visit-form .visit-selected-item input {
  width: 54px;
}

.visit-form .visit-selected-item button {
  min-width: 28px;
  padding: 2px 8px;
}

.visit-form .visit-item-picker input,
.visit-form .visit-item-picker button,
.visit-form textarea {
  min-width: 0;
}

.visit-form textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
}
.visit-form .visit-create-submit {
  height: 40px;
  min-height: 40px;
  width: max-content;
  min-width: max-content;
  padding: 8px 14px;
  white-space: nowrap;
  justify-self: start;
  grid-column: 1;
}
.client-bonus-submit,
form[data-client-bonus-op] > button.primary { grid-column: 1; justify-self: start; }
form[data-visit-edit] > button.primary {
  grid-column: 1;
  width: max-content;
  min-width: max-content;
  height: 40px;
  min-height: 40px;
  padding: 8px 14px;
  white-space: nowrap;
  justify-self: start;
}
form[data-visit-edit] .readonly-field {
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}
form[data-visit-edit] .readonly-field b {
  display: flex;
  min-height: 40px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #cfd7e6;
  border-radius: 7px;
  background: transparent;
  box-sizing: border-box;
}
form[data-visit-edit] input[name="paid_amount"] {
  height: 40px;
  min-height: 40px;
}
form[data-visit-edit] .visit-item-picker {
  display: grid;
  width: min(100%, 320px);
  grid-template-columns: minmax(0, 1fr) 80px;
  gap: 8px;
  align-items: start;
}
form[data-visit-edit] .visit-item-picker input,
form[data-visit-edit] .visit-item-picker select {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

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

.card-config-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 821px) {
  .registration-card-config-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .registration-card-config-grid .card-config-block {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

.client-card-config-columns {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.client-card-config-column {
  display: grid;
  min-width: 0;
  gap: 12px;
  align-content: start;
}

.client-card-config-column > h3 {
  margin: 0;
  color: #334155;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.client-card-config-column
.card-config-block {
  grid-template-columns: 1fr;
}

.client-card-config-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.client-card-config-head {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.client-card-config-head h4 {
  min-width: 0;
  margin: 0;
}

.client-card-config-head
.card-block-switch {
  flex: 0 0 28px;
  margin-left: auto;
  justify-self: auto;
}

.client-card-config-settings {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.card-config-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 14px;
  align-items: start;
  padding: 12px;
  border: 1px solid #dce3ee;
  border-radius: 8px;
  background: #f8fbff;
  cursor: grab;
}

.card-config-block.dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.card-config-block h4 {
  margin: 0 0 8px;
}

.card-preview {
  display: grid;
  gap: 8px;
}

.client-card-bonus-preview {
  display: grid;
  gap: 6px;
}

.client-card-bonus-preview > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.client-card-bonus-preview span {
  color: #667085;
}

.card-block-settings {
  display: grid;
  grid-template-columns: minmax(90px, 1fr);
  gap: 8px;
}

.checkbox-select {
  position: relative;
  border: 1px solid #d5deec;
  border-radius: 7px;
  background: #fff;
  padding: 8px;
}

.checkbox-select summary {
  cursor: pointer;
  font-size: 13px;
}

.client-card-currency-select { width: min(360px, 100%); }
.client-card-currency-select .checkbox-select { width: 100%; }

.card-bottom-switch {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.card-bottom-switch button.active {
  background: #2563eb;
  color: #fff;
}

.card-visit-items {
  margin: 6px 0 0;
  padding-left: 18px;
}

.card-visit-details {
  margin-top: 12px;
}

.search { max-width: 420px; }
.client-search {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 180px 180px;
  gap: 12px;
  align-items: end;
}
.client-search-submit {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  height: 40px;
  min-height: 40px;
  flex: 0 0 auto;
  padding: 0 20px;
  border-radius: 6px;
  font-size: 14px;
  justify-self: start;
  box-sizing: border-box;
}
.client-search-reset {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  height: 40px;
  min-height: 40px;
  padding: 0 20px;
  justify-self: start;
  box-sizing: border-box;
}
.card-mode-tabs .btn.btn-outline-secondary {
  border-radius: 6px;
  transform: none;
}

.card-mode-tabs .btn.btn-outline-secondary:hover {
  color: #ffffff;
  background-color: #6b7280;
  border-color: #6b7280;
  transform: none;
}

.card-mode-tabs .btn.btn-outline-secondary.active {
  color: #ffffff;
  background-color: #6b7280;
  border-color: #6b7280;
}

.card-mode-tabs .btn.btn-outline-secondary.active:hover {
  color: #ffffff;
  background-color: #6b7280;
  border-color: #6b7280;
  transform: none;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.pagination > div {
  display: flex;
  align-items: end;
  gap: 8px;
}
.pagination > div > button {
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
}
.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 7px;
  padding: 8px 14px;
}
.table-wrap { overflow-x: auto; border: 1px solid #e3e8f1; border-radius: 10px; background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
thead th {
  background: #fafbfd;
  color: #667085;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid #e3e8f1;
}
th, td { padding: 12px 14px; border-bottom: 1px solid #eef2f7; text-align: left; vertical-align: middle; line-height: 1.5; }
.centered-list-table th,
.centered-list-table td { text-align: center; vertical-align: middle; }
tbody tr:not(.loyalty-rule-row):not(.loyalty-transition-rule-row):not(.service-staff-row):hover > td { background: #f8fafc; }
.table-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  cursor: pointer;
  text-align: inherit;
}
.table-sort:hover { color: #172033; }
.table-sort:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; border-radius: 4px; }
.table-sort-label { display: inline-block; }
.table-sort-marker { display: inline-block; }
tr:last-child td { border-bottom: 0; }
td small { display: block; color: #667085; margin-top: 4px; font-size: 13px; line-height: 1.4; }
.task-progress {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 44px;
  align-items: center;
  gap: 10px;
  min-width: 200px;
}
.task-progress progress {
  width: 100%;
}
.empty, .skeleton {
  padding: 18px;
  border: 1px dashed #cfd7e6;
  border-radius: 8px;
  color: #667085;
  background: #fafcff;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgb(15 23 42 / 45%);
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  overscroll-behavior: none;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(1040px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border: 1px solid #dce3ee;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgb(15 23 42 / 20%);
  padding: 20px;
  display: grid;
  gap: 16px;
}

.auth-code-card {
  width: min(420px, calc(100vw - 32px));
}

.task-added-card {
  width: min(420px, 100%);
}

.task-added-card .modal-grid {
  grid-template-columns: 1fr;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-head h3 {
  margin: 0;
}

.modal-title-id {
  color: #667085;
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
  white-space: nowrap;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.client-level-field { display: grid; gap: 6px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; }
.client-level-label { display: flex; align-items: center; gap: 10px; }
.client-level-label .checkbox { font-size: 11px; font-weight: 400; }
.client-level-save-field { display: grid; gap: 8px; align-content: start; margin-top: 12px; }
.client-level-save-field .primary {
  width: auto;
  min-width: 100px;
  height: 40px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 7px;
  justify-self: start;
}
.visit-pagination { display: flex; align-items: center; gap: 8px; }

.inventory-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.inventory-title { display: grid; gap: 4px; width: 100%; }
.inventory-title h2, .inventory-title h3 { margin: 0; }
.inventory-created-at { color: #667085; font-size: 13px; }
.inventory-filters { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.inventory-filter { display: grid; width: 260px; gap: 6px; }
.inventory-filter > span { color: #667085; font-size: 13px; font-weight: 500; }
.inventory-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.inventory-comment { display: grid; max-width: 560px; gap: 6px; margin-bottom: 16px; }
.inventory-comment textarea { min-height: 72px; resize: vertical; }
.inventory-actual-input { width: 120px !important; min-width: 120px; min-height: 34px; height: 34px; padding: 5px 8px; }
.inventory-difference { font-weight: 600; }
.inventory-difference.is-negative { color: #dc2626; }
.inventory-difference.is-positive { color: #15803d; }
.inventory-difference.is-zero { color: #667085; }
.inventory-name-field { display: grid; width: min(420px, 100%); gap: 6px; margin-bottom: 14px; }
.inventory-list-table tbody tr[data-inventory-open] { cursor: pointer; }
.inventory-list-table tbody tr[data-inventory-open]:hover { background: #f7f9fc; }
.inventory-list-sequence { margin-left: 6px; color: #667085; font-size: 12px; font-weight: 500; }
.inventory-editor-footer { display: flex; margin-top: 18px; padding-top: 14px; align-items: center; justify-content: flex-start; gap: 8px; border-top: 1px solid #e3e8f1; }
.inventory-view-footer { display: flex; margin-top: 18px; padding-top: 14px; align-items: center; justify-content: flex-start; border-top: 1px solid #e3e8f1; }
.inventory-saved-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.inventory-saved-filters > div { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid #e3e8f1; border-radius: 8px; background: #fafbfd; }
.inventory-saved-filters span, .inventory-saved-comment > span { color: #667085; font-size: 12px; }
.inventory-saved-filters strong { color: #344054; font-size: 13px; font-weight: 500; }
.inventory-document-title { margin: 0; color: #172033; font-size: 17px; font-weight: 600; }
.inventory-saved-comment { display: grid; gap: 4px; margin-bottom: 16px; }
.inventory-saved-comment p { margin: 0; white-space: pre-wrap; }
@media (max-width: 720px) { .inventory-saved-filters { grid-template-columns: 1fr; } }

.category-products-editor { display: grid; gap: 16px; margin-top: 20px; padding-top: 18px; border-top: 1px solid #e3e8f1; }
.category-products-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.category-products-editor-head h4 { margin: 0; color: #172033; font-size: 16px; font-weight: 600; }
.category-product-create-form { display: grid; grid-template-columns: minmax(200px, 1fr) 120px 110px minmax(180px, 1fr) auto; gap: 10px; align-items: end; }
.category-product-search { max-width: 360px; }
.category-product-pagination { display: flex; margin-top: 12px; align-items: center; justify-content: center; gap: 10px; }
.product-category-modal { width: min(920px, 92vw); max-height: 90vh; overflow-y: auto; }

.warehouse-storage-products-head { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 14px; }
.schedule-page { display: grid; min-width: 0; gap: 16px; }
.schedule-head, .schedule-week-nav, .schedule-toolbar, .schedule-toolbar-left, .schedule-toolbar-right, .schedule-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.schedule-head, .schedule-toolbar { justify-content: space-between; }
.schedule-head h2 { margin: 0; }
.schedule-week-title { min-width: 190px; text-align: center; font-weight: 600; }
.schedule-filter, .schedule-search { display: grid; width: min(260px, 100%); gap: 6px; color: #667085; font-size: 13px; font-weight: 500; }
.schedule-filter .branch-multiselect-dropdown { width: 100%; }
.schedule-search input { width: 100%; box-sizing: border-box; }
.schedule-inactive { color: #667085; font-size: 13px; }
.schedule-actions { justify-content: space-between; }
.schedule-grid-viewport { position: relative; max-height: min(72dvh, calc(100dvh - 240px)); overflow: auto; border: 1px solid #d9dee8; border-radius: 10px; background: #fff; scrollbar-gutter: stable; }
.schedule-grid { display: grid; grid-template-columns: 240px repeat(7, minmax(115px, 1fr)); width: max(100%, 1050px); }
.schedule-day-head { position: sticky; top: 0; z-index: 4; display: grid; min-height: 58px; place-items: center; border-right: 1px solid #e2e6ee; border-bottom: 1px solid #e2e6ee; background: #fff; }
.schedule-day-head small { color: #4299e1; font-size: 11px; }
.schedule-grid-corner { position: sticky; top: 0; left: 0; z-index: 6; }
.schedule-employee-head { position: sticky; left: 0; z-index: 3; display: flex; min-width: 0; min-height: 76px; padding: 10px; align-items: center; border-right: 1px solid #e2e6ee; border-bottom: 1px solid #e2e6ee; background: #fff; }
.schedule-employee-main { position: relative; display: flex; width: 100%; min-width: 0; align-items: center; gap: 9px; padding-right: 30px; }
.schedule-employee-open { display: flex; flex: 1; min-width: 0; min-height: 0; padding: 0; align-items: center; gap: 9px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.schedule-employee-open:hover { background: rgb(15 23 42 / 3%); }
.schedule-avatar { display: grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; overflow: hidden; border-radius: 50%; background: #eaf2fb; color: #344054; font-size: 12px; font-weight: 600; }
.schedule-avatar img { width: 100%; height: 100%; object-fit: cover; }
.schedule-employee-text { display: grid; min-width: 0; gap: 2px; }
.schedule-employee-text strong, .schedule-employee-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-employee-text small { color: #667085; font-size: 12px; }
.schedule-week-menu { position: absolute; top: 2px; right: 2px; display: grid; width: 26px; min-width: 26px; height: 26px; min-height: 26px; padding: 0; place-items: center; border-radius: 6px; font-size: 13px; line-height: 1; color: #344054; }
.schedule-week-menu:hover { background: #f1f5f9; }
.schedule-grid.is-selection-mode .schedule-cell { user-select: none; cursor: crosshair; }
.schedule-grid.is-selection-mode .schedule-cell:hover { background: rgb(66 153 225 / 5%); }
.schedule-grid.is-drag-selecting .schedule-cell { cursor: crosshair; }
.schedule-cell { position: relative; display: grid; min-height: 76px; padding: 7px; place-items: stretch; border-right: 1px solid #e2e6ee; border-bottom: 1px solid #e2e6ee; background: #fff; cursor: pointer; }
.schedule-cell.is-empty { place-items: center; color: #98a2b3; }
.schedule-cell-add { position: absolute; top: 5px; right: 7px; opacity: 0; color: #4299e1; font-size: 13px; transition: opacity .15s ease; }
.schedule-cell.is-empty:hover .schedule-cell-add { opacity: 1; }
.schedule-shift-card { position: relative; display: grid; width: 100%; min-width: 0; padding: 7px 8px; align-content: center; gap: 2px; border: 1px solid #9dc9ed; border-radius: 7px; background: rgb(66 153 225 / 8%); }
.schedule-fill-handle { position: absolute; right: -3px; bottom: -3px; width: 8px; height: 8px; border: 1px solid #fff; border-radius: 2px; background: #4299e1; cursor: crosshair; opacity: 0; transition: opacity .15s ease; }
.schedule-shift-card:hover .schedule-fill-handle, .schedule-shift-card.is-fill-source .schedule-fill-handle { opacity: 1; }
.schedule-grid.is-selection-mode .schedule-fill-handle { display: none; }
.schedule-cell.is-fill-preview { background: rgb(66 153 225 / 8%); box-shadow: inset 0 0 0 2px rgb(66 153 225 / 45%); }
.schedule-grid.is-fill-dragging { user-select: none; }
.schedule-grid.is-fill-dragging .schedule-cell { cursor: crosshair; }
.schedule-shift-time { color: #172033; font-size: 13px; font-weight: 600; white-space: nowrap; }
.schedule-shift-break { overflow: hidden; color: #667085; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-cell.is-selected { outline: 2px solid #4299e1; outline-offset: -2px; background: rgb(66 153 225 / 7%); }
.schedule-day-head.is-today, .schedule-cell.is-today { background: rgb(66 153 225 / 4%); }
.schedule-day-head.is-weekend { background: #fafbfc; }
.schedule-selection-bar { position: sticky; bottom: 10px; z-index: 20; display: flex; width: fit-content; margin: 0 auto; padding: 10px 14px; align-items: center; gap: 14px; flex-wrap: wrap; border: 1px solid #172033; border-radius: 10px; background: #172033; color: #fff; box-shadow: 0 12px 32px rgb(15 23 42 / 24%); }
.schedule-selection-status, .schedule-selection-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.schedule-selection-status strong { font-size: 14px; }
.schedule-selection-status span { color: #d0d5dd; font-size: 13px; }
.schedule-selection-bar [data-schedule-bulk] { border-color: #fff; background: #fff; color: #172033; }
.schedule-selection-bar [data-schedule-clear] { border-color: rgb(255 255 255 / 42%); color: #fff; }
.schedule-selection-bar [data-schedule-unselect] { border-color: rgb(255 255 255 / 42%); color: #101828; }
.schedule-selection-bar [data-schedule-unselect]:hover { background: rgb(255 255 255 / 10%); }
.schedule-selection-bar button:disabled { opacity: .5; cursor: not-allowed; }
.schedule-shift-form { display: grid; gap: 14px; }
.schedule-time-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 8px; }
.schedule-break-row { display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: center; gap: 8px; margin: 8px 0; }
.schedule-modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.modal-card.schedule-week-actions-modal { width: min(420px, calc(100vw - 48px)); }
.schedule-week-actions-form { display: grid; width: 100%; gap: 12px; }
.schedule-week-actions-context { display: grid; gap: 2px; }
.schedule-week-actions-context strong { color: #172033; font-size: 14px; font-weight: 600; }
.schedule-week-actions-context small { color: #667085; font-size: 12px; }
.schedule-week-actions-time { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.schedule-week-actions-modal input[type="time"] { min-height: 38px; height: 38px; }
.schedule-week-actions-modal label { gap: 5px; font-size: 13px; }
.schedule-week-actions-modal .schedule-break-row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 32px; gap: 6px; margin: 6px 0; }
.schedule-week-actions-modal .schedule-break-row [data-schedule-remove-break] { display: grid; width: 32px; min-width: 32px; height: 32px; min-height: 32px; padding: 0; place-items: center; }
.schedule-week-actions-modal [data-schedule-add-break] { min-height: 32px; padding: 4px 0; justify-self: start; color: #4299e1; }
.schedule-week-actions-footer { display: flex; margin-top: 2px; padding-top: 12px; align-items: center; justify-content: flex-end; gap: 8px; border-top: 1px solid #eaecf0; }
.schedule-week-actions-message { min-height: 0; margin: 0; color: #b42318; font-size: 12px; }
@media (max-width: 640px) { .schedule-grid { grid-template-columns: 180px repeat(7, 110px); } .schedule-selection-bar { width: calc(100% - 16px); justify-content: center; } .schedule-selection-status, .schedule-selection-actions { justify-content: center; } }
@media (max-width: 480px) { .modal-card.schedule-week-actions-modal { width: calc(100vw - 24px); } }
.warehouse-product-picker { width: min(700px, 90vw); }
.warehouse-product-picker-fields { display: grid; gap: 16px; }
.warehouse-product-picker-category-section, .warehouse-product-picker-product-section { display: grid; min-width: 0; gap: 8px; }
.warehouse-product-picker-search { display: grid; width: 100%; gap: 6px; }
.warehouse-product-picker-search input { width: 100%; min-width: 0; }
.warehouse-product-picker-search > span { color: #667085; font-size: 13px; font-weight: 500; }
.warehouse-product-picker-categories { display: grid; gap: 4px; }
.warehouse-product-picker-list { display: grid; width: 100%; min-width: 0; }
.warehouse-product-picker-category { width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.warehouse-product-picker-category:hover, .warehouse-product-picker-item:hover { background: #f7f9fc; }
.warehouse-product-picker-category.is-active { border-color: #4299e1; background: rgb(66 153 225 / 8%); }
.warehouse-product-picker-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 90px;
  align-items: start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 10px 8px;
  border-bottom: 1px solid #e5eaf1;
}
.warehouse-product-picker-checkbox {
  align-self: start;
  width: 16px !important;
  min-width: 16px;
  height: 16px !important;
  min-height: 16px;
  margin: 3px 0 0;
  padding: 0;
  accent-color: #4299e1;
  cursor: pointer;
}
.warehouse-product-picker-item-title {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  color: #344054;
  font-size: 14px;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.warehouse-product-picker-amount {
  align-self: start;
  width: 90px !important;
  min-width: 90px;
  min-height: 32px;
  height: 32px;
  padding: 4px 8px;
  text-align: right;
}
.warehouse-product-picker-amount:disabled { opacity: .45; cursor: default; }
.warehouse-product-picker-pagination { display: flex; margin-top: 12px; align-items: center; justify-content: center; gap: 12px; }
.warehouse-product-picker-footer { display: flex; margin-top: 18px; padding-top: 14px; border-top: 1px solid #e3e8f1; align-items: center; justify-content: space-between; gap: 12px; }
.warehouse-product-picker-hint { margin-top: 32px; text-align: center; }
.warehouse-product-picker-select-all { display: flex; min-height: 38px; padding: 7px 8px; align-items: center; gap: 8px; border-bottom: 1px solid #e3e8f1; color: #344054; cursor: pointer; }
.warehouse-product-picker-select-all input[type="checkbox"] { width: 16px; min-width: 16px; height: 16px; min-height: 16px; margin: 0; accent-color: #4299e1; }
.warehouse-product-picker-select-all span { font-size: 13px; font-weight: 600; }
.warehouse-product-picker-select-all small { margin-left: auto; color: #667085; font-size: 12px; font-weight: 400; }
.warehouse-product-picker-select-all:hover { background: #f8fafc; }

@media (max-width: 820px) {
  .category-product-create-form { grid-template-columns: 1fr; }
  .category-product-search { max-width: none; }
  .product-category-modal { width: min(100%, 94vw); }
  .warehouse-product-picker { width: 100%; }
}

@media (max-width: 1180px) {
  :root { --sidebar-width: 224px; }
  .content { padding: 20px; }
}

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

.organization-profile-modal {
  width: min(620px, 100%);
}

.organization-profile-form {
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: start;
}

.organization-profile-form .organization-name-field {
  grid-column: 1;
  max-width: 320px;
}

.organization-profile-form .achievement-photo-field {
  grid-column: 2;
  grid-row: 1 / span 2;
}

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

.user-profile-card {
  overflow: hidden;
  border: 1px solid #e3e9f3;
  border-radius: 18px;
  background: #fff;
}

.user-profile-card-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  background: #f6f8fc;
  border-bottom: 1px solid #e3e9f3;
}

.user-photo-field {
  display: grid;
  gap: 8px;
  justify-items: center;
  flex: 0 0 auto;
}

.user-profile-avatar {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #2d63dc;
  box-shadow: 0 3px 12px rgb(30 58 138 / 18%);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}

.user-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-profile-summary span,
.user-profile-summary p {
  color: #667085;
  font-size: 13px;
}

.user-profile-summary h4 {
  margin: 3px 0;
  color: #15233b;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.user-profile-summary p {
  margin: 0;
}

.user-profile-section {
  padding: 20px 22px;
}

.user-profile-section + .user-profile-section {
  border-top: 1px solid #e9edf5;
}

.user-profile-section h5 {
  margin: 0 0 16px;
  color: #334155;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.user-booking-block-hint { margin: -6px 0 14px; color: #667085; font-size: 12px; }
.user-booking-blocks { display: grid; gap: 10px; }
.user-booking-block-row { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)) auto; gap: 10px; align-items: end; padding: 12px; border: 1px solid #e3e9f3; border-radius: 10px; background: #f8fafc; }
.user-booking-block-row .danger { min-height: 36px; color: #b42318; }
.user-booking-block-add { margin-top: 12px; }

.user-profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.user-profile-access {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.user-profile-access .modal-full {
  grid-column: 1 / -1;
}

.client-profile-modal {
  overflow-x: hidden;
}

.client-profile-card-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 16px 0 0;
  padding: 20px 22px;
  border: 1px solid #e3e9f3;
  border-radius: 16px 16px 0 0;
  background: #f6f8fc;
}

.client-profile-avatar {
  display: grid;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #2d63dc;
  box-shadow: 0 3px 12px rgb(30 58 138 / 18%);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}

.client-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.client-profile-summary span,
.client-profile-summary p {
  color: #667085;
  font-size: 13px;
}

.client-profile-summary h4 {
  margin: 3px 0;
  color: #15233b;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.client-profile-summary p {
  margin: 0;
}

.client-profile-form {
  padding: 20px 22px 22px;
  border: 1px solid #e3e9f3;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: #fff;
}
.achievement-add-condition {
  grid-column: 1;
  justify-self: start;
}
.achievement-create {
  grid-column: 1;
  justify-self: start;
}
.settings-achievement-save {
  grid-column: 1;
  width: 100px;
  min-width: 100px;
  height: 40px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 7px;
  justify-self: start;
}
.client-profile-form .client-profile-save {
  grid-column: 1;
  width: 100px;
  min-width: 100px;
  height: 40px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 7px;
  justify-self: start;
}
.standard-save-button {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  padding: 8px 14px;
  border-radius: 7px;
  justify-self: start;
  flex: 0 0 100px;
}

.service-profile-modal {
  overflow-x: hidden;
}

.service-profile-card-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 16px 0 0;
  padding: 20px 22px;
  border: 1px solid #e3e9f3;
  border-radius: 16px 16px 0 0;
  background: #f6f8fc;
}

.service-profile-avatar {
  display: grid;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 16px;
  background: #2d63dc;
  box-shadow: 0 3px 12px rgb(30 58 138 / 18%);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}

.service-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-profile-summary span,
.service-profile-summary p {
  color: #667085;
  font-size: 13px;
}

.service-profile-summary h4 {
  margin: 3px 0;
  color: #15233b;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.service-profile-summary p {
  margin: 0;
}

.service-profile-form {
  padding: 20px 22px 22px;
  border: 1px solid #e3e9f3;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: #fff;
}

.rule-checkbox-select {
  position: relative;
  gap: 8px;
}

.rule-checkbox-window {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
  padding: 10px;
  border: 1px solid #cfd7e6;
  border-radius: 7px;
  background: #fff;
}

.rule-checkbox-select .branch-multiselect-dropdown[open] .rule-checkbox-window {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
}

.rule-checkbox-option {
  justify-content: flex-start;
  white-space: normal;
}

.rule-checkbox-option span {
  color: #172033;
}

.events-filter-control {
  display: grid;
  width: min(280px, 100%);
  justify-self: start;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #cfd8e6;
  border-radius: 7px;
  background: #f8fbff;
}

.events-filter-control > span {
  color: #344054;
  font-size: 13px;
}

.events-filter-control .branch-multiselect-options {
  grid-template-columns: 1fr;
}

.readonly-field {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fbff;
  display: grid;
  gap: 6px;
}

.readonly-field span {
  color: #667085;
  font-size: 13px;
}

.readonly-field b {
  font-size: 15px;
  line-height: 1.4;
}

.auth-link-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
}

.auth-link-actions {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  justify-self: end;
}

.photo-upload-field {
  align-items: start;
}

.photo-upload-control {
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.photo-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background-color .18s ease;
}

.photo-upload-button:hover {
  border-color: #94a3b8;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.photo-upload-button:active {
  transform: translateY(1px);
}

.client-photo-preview {
  display: block;
  width: min(220px, 100%);
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid #dce3ee;
  border-radius: 10px;
  background: #f8fbff;
}

.achievement-photo-field {
  grid-column: 2;
  grid-row: 1 / span 4;
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 8px;
}

[data-entity-edit][data-type="achievement"] .achievement-name-field {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
}

[data-entity-edit][data-type="achievement"] .achievement-photo-field {
  grid-column: 2;
  grid-row: 1 / span 4;
  align-self: start;
}

.achievement-photo-preview {
  display: block;
  width: 132px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid #dce3ee;
  border-radius: 8px;
  background: #f8fbff;
}

@media (max-width: 820px) {
  .content { padding: 16px; }
  .client-card-config-columns { grid-template-columns: 1fr; }
  .app.sidebar-open .content {
    margin-left: min(var(--sidebar-width), 88vw);
  }
  .grid { grid-template-columns: 1fr; }
  .inline-form { grid-template-columns: 1fr; }
  .inline-form.compact { grid-template-columns: 1fr; }
  .client-search { grid-template-columns: 1fr; }
  .client-search-submit, .client-search-reset { width: 100%; min-width: 0; max-width: none; }
  .finance-expenses-form { grid-template-columns: 1fr; }
  .finance-expense-name-field,
  .finance-expense-amount-field {
    width: 100%;
  }
  .finance-expenses-form .standard-save-button { width: 100%; }
  .permission-matrix { grid-template-columns: 1fr; }
  .loyalty-grid { grid-template-columns: 1fr; }
  .card-config-block { grid-template-columns: 1fr; }
  .card-bottom-switch { justify-content: stretch; }
  .card-bottom-switch button { flex: 1; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar-title { width: 100%; }
  .modal-grid { grid-template-columns: 1fr; }
  .achievement-photo-field { grid-column: 1; grid-row: auto; justify-items: start; }
  [data-entity-edit][data-type="achievement"] .achievement-name-field,
  [data-entity-edit][data-type="achievement"] .achievement-photo-field {
    grid-column: 1;
    grid-row: auto;
  }
  .organization-profile-form .organization-name-field,
  .organization-profile-form .achievement-photo-field { grid-column: 1; grid-row: auto; }
  .warehouse-transfer-fields,
  .warehouse-transfer-content {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .warehouse-transfer-search-label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ajax-indicator,
  [data-page-content].is-live-refreshing,
  .title-hint::after,
  .photo-upload-button,
  .sidebar {
    transition: none;
  }

  .ajax-indicator span,
  .live-splash,
  [data-page-content].live-updated .panel,
  [data-page-content].live-updated .modal-card,
  [data-page-content].live-updated .entity-card,
  [data-page-content].live-updated .metric,
  [data-page-content].live-updated .stat {
    animation: none;
  }
}


.organization-bots-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.organization-bot-card { border: 1px solid var(--border, #d8e0ec); border-radius: 12px; padding: 16px; background: #fff; }
.organization-bot-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.organization-bot-heading h3, .organization-bot-heading p { margin: 0; }
.organization-bot-heading p { margin-top: 4px; color: #667085; }
.organization-bot-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 24px;
  padding: 2px 6px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}

.organization-bot-status.bg-danger-soft {
  background: #fef3f2;
}

.organization-bot-status.border-danger-subtle {
  border-color: #fecdca;
}

.organization-bot-status.text-fg-danger-strong {
  color: #b42318;
}

.organization-bot-status.bg-success-soft {
  background: #ecfdf3;
}

.organization-bot-status.border-success-subtle {
  border-color: #a6f4c5;
}

.organization-bot-status.text-fg-success-strong {
  color: #067647;
}

.workplace-employee-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4299e1;
  font: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.workplace-employee-link:hover {
  background: transparent;
  color: #3182ce;
  text-decoration: underline;
}

.workplace-employee-link:focus-visible {
  border-radius: 3px;
  outline: 2px solid #4299e1;
  outline-offset: 3px;
}
.organization-bot-actions { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.organization-bot-token { display: grid; gap: 5px; min-width: 160px; color: #51637b; font-size: 12px; }
.organization-bot-token input { height: 40px; }
.organization-bot-actions > .primary { height: 40px; padding: 0 16px; white-space: nowrap; }
.organization-bot-switch { position: relative; width: 50px; height: 40px; display: grid; align-items: center; cursor: pointer; }
.organization-bot-switch input { position: absolute; inset: 0; z-index: 1; opacity: 0; cursor: pointer; }
.organization-bot-switch span { width: 50px; height: 28px; border-radius: 999px; background: #cbd5e1; box-shadow: inset 0 0 0 1px #b6c2d2; transition: background .18s ease, box-shadow .18s ease; }
.organization-bot-switch span::after { content: ""; display: block; width: 22px; height: 22px; margin: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgb(15 23 42 / 20%); transition: transform .18s ease; }
.organization-bot-switch input:checked + span { background: #4299e1; box-shadow: inset 0 0 0 1px #4299e1; }
.organization-bot-switch input:checked + span::after { transform: translateX(22px); }
.organization-bot-switch input:focus-visible + span { outline: 3px solid rgb(37 99 235 / 22%); outline-offset: 3px; }
.organization-bot-switch input:disabled + span { opacity: .5; }
.organization-bot-switch:has(input:disabled) { cursor: not-allowed; }
.organization-bot-message { flex-basis: 100%; margin: 0; min-height: 18px; }
.organization-bot-toast { position: fixed; z-index: 300; right: 20px; bottom: 20px; padding: 13px 17px; border-radius: 10px; box-shadow: 0 12px 28px rgb(15 23 42 / 24%); color: #fff; font-weight: 700; opacity: 0; transform: translateY(14px); transition: opacity .2s ease, transform .2s ease; }
.organization-bot-toast.is-visible { opacity: 1; transform: translateY(0); }
.organization-bot-toast.is-success { background: #157347; }
.organization-bot-toast.is-danger { background: #c62828; }

@media (max-width: 560px) {
  .organization-bot-actions { align-items: stretch; }
  .organization-bot-token { flex: 1 1 100%; }
  .organization-bot-actions > .primary { flex: 1; }
}

.user-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  width: auto;
  margin: 16px 0 0;
  padding: 0;
  flex-wrap: nowrap;
}

.user-pagination .page-item {
  flex: 0 0 auto;
}

.user-pagination .page-link {
  min-width: 36px;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.user-pagination .page-item.active .page-link {
  background: #4299e1;
  border-color: #4299e1;
  color: #fff;
}

.auth-primary-btn {
  background-color: #4299e1;
  border-color: #4299e1;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  transition:
    background-color .15s ease,
    border-color .15s ease;
}
.auth-primary-btn:hover {
  background-color: #63b3ed;
  border-color: #63b3ed;
}
.auth-primary-btn:active {
  background-color: #3182ce;
  border-color: #3182ce;
}
.auth-primary-btn svg { flex-shrink: 0; }
.auth-primary-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.auth-register-form .auth-input-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-register-form .auth-input-icon-addon {
  position: absolute;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  pointer-events: none;
}

.auth-register-form .auth-input-icon-addon svg {
  width: 18px;
  height: 18px;
}

.auth-register-form .auth-form-control {
  width: 100%;
  height: 40px;
  padding: 8px 12px 8px 42px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  font-size: 14px;
}

.auth-register-form .auth-form-control:focus {
  border-color: #4299e1;
  outline: none;
  box-shadow: 0 0 0 3px rgba(66,153,225,.15);
}

.auth-register-form .auth-primary-btn,
.auth-register-form .auth-tabs .primary {
  background-color: #4299e1;
  border-color: #4299e1;
  color: #ffffff;
  transition:
    background-color .15s ease,
    border-color .15s ease;
}

.auth-register-form .auth-primary-btn:hover,
.auth-register-form .auth-tabs .primary:hover {
  background-color: #63b3ed;
  border-color: #63b3ed;
}

.auth-login-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.auth-login-actions .auth-primary-btn { width: 100%; }

input[type="checkbox"] { accent-color: #4299e1; }
.card-block-switch {
  position: relative;
  display: inline-grid;
  width: 28px;
  height: 22px;
  flex: 0 0 28px;
  align-items: center;
  justify-self: end;
  cursor: pointer;
}

.card-block-switch input {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.card-block-switch span {
  position: relative;
  display: block;
  width: 28px;
  height: 16px;

  border-radius: 999px;

  background: #cbd5e1;

  box-shadow:
    inset 0 0 0 1px #b6c2d2;

  transition:
    background .18s ease,
    box-shadow .18s ease;
}

.card-block-switch span::after {
  content: "";

  position: absolute;
  top: 2px;
  left: 2px;

  width: 12px;
  height: 12px;

  border-radius: 50%;

  background: #fff;

  box-shadow:
    0 1px 3px rgb(15 23 42 / 22%);

  transition:
    transform .18s ease;
}

.card-block-switch input:checked + span {
  background: #4299e1;

  box-shadow:
    inset 0 0 0 1px #4299e1;
}

.card-block-switch input:checked + span::after {
  transform: translateX(12px);
}

.card-block-switch input:focus-visible + span {
  outline: 2px solid rgb(66 153 225 / 28%);
  outline-offset: 2px;
}

/* Clients chat shell */
.clients-chat-root { position: relative; z-index: 300; }
.clients-chat-fab { position: fixed; right: 24px; bottom: 24px; z-index: 301; display: grid; width: 52px; height: 52px; padding: 12px; place-items: center; overflow: visible; border: 0; border-radius: 50%; background: #4299e1; box-shadow: 0 10px 26px rgb(31 81 129 / 24%); cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, opacity 160ms ease, visibility 160ms ease; }
body.clients-chat-is-open .clients-chat-fab { opacity: 0; visibility: hidden; pointer-events: none; }
.clients-chat-fab:hover { background: #3182ce; box-shadow: 0 13px 30px rgb(31 81 129 / 30%); transform: translateY(-2px); }
.clients-chat-fab:active { transform: translateY(0) scale(.96); }
.clients-chat-fab:focus-visible, .clients-chat-icon-button:focus-visible, .clients-chat-item:focus-visible, .clients-chat-search input:focus-visible, .clients-chat-composer textarea:focus-visible { outline: 2px solid #4299e1; outline-offset: 2px; }
.clients-chat-fab img { width: 28px; height: 28px; filter: brightness(0) invert(1); }
.clients-chat-fab__unread { position: absolute; top: -5px; right: -5px; display: inline-flex; min-width: 20px; height: 20px; align-items: center; justify-content: center; padding: 0 5px; border: 2px solid #fff; border-radius: 999px; background: #e53935; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; pointer-events: none; box-shadow: 0 2px 6px rgb(0 0 0 / 18%); }
.clients-chat-fab__unread[hidden] { display: none; }
.clients-chat-backdrop { position: fixed; inset: 0; z-index: 300; background: rgb(15 23 42 / 24%); opacity: 0; transition: opacity .22s ease; }
.clients-chat-backdrop.is-open { opacity: 1; }
.clients-chat-drawer { position: absolute; top: 0; right: 0; display: flex; width: min(86vw, 1320px); height: 100%; background: #fff; box-shadow: -16px 0 42px rgb(15 23 42 / 16%); transform: translateX(100%); transition: transform .22s ease; }
.clients-chat-backdrop.is-open .clients-chat-drawer { transform: translateX(0); }
.clients-chat-sidebar { display: flex; flex: 0 0 320px; min-width: 0; flex-direction: column; border-right: 1px solid #e3e8f1; background: #fff; }
.clients-chat-sidebar__header, .clients-chat-header { display: flex; min-height: 70px; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #e3e8f1; }
.clients-chat-sidebar__header { justify-content: space-between; }
.clients-chat-sidebar__header h2 { margin: 0; color: #172033; font-size: 19px; font-weight: 600; }
.clients-chat-icon-button { display: inline-grid; width: 38px; height: 38px; flex: 0 0 38px; padding: 0; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #667085; cursor: pointer; font-size: 25px; line-height: 1; }
.clients-chat-icon-button:hover { background: #eef2f7; color: #172033; }
.clients-chat-search { display: grid; gap: 5px; padding: 14px 16px 10px; }
.clients-chat-search input { width: 100%; min-height: 40px; box-sizing: border-box; padding: 9px 12px; border: 1px solid #dce3ee; border-radius: 8px; background: #f8fafc; color: #172033; font: inherit; }
.clients-chat-search input::placeholder { color: #98a2b3; }
.clients-chat-list { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 14px; }
.clients-chat-item { display: flex; width: 100%; min-height: 68px; align-items: center; gap: 11px; padding: 10px 10px; border: 0; border-bottom: 1px solid #eef2f7; border-radius: 8px; background: transparent; color: #172033; cursor: pointer; text-align: left; transition: background .15s ease, color .15s ease; }
.clients-chat-item:hover { background: #f5f8fc; }
.clients-chat-item.is-active { background: rgb(66 153 225 / 12%); }
.clients-chat-item__copy { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 3px; }
.clients-chat-item__copy strong { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.clients-chat-item__copy small { overflow: hidden; color: #667085; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.clients-chat-avatar { position: relative; display: inline-grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; overflow: hidden; border-radius: 50%; background: #e8f2fc; color: #246aa5; font-size: 13px; font-weight: 700; }
.clients-chat-avatar--large { width: 42px; height: 42px; flex-basis: 42px; }
.clients-chat-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.clients-chat-main { display: flex; min-width: 0; flex: 1; flex-direction: column; background: #f8fafc; }
.clients-chat-header { flex: 0 0 70px; background: #fff; }
.clients-chat-header > div { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 2px; }
.clients-chat-header strong { overflow: hidden; color: #172033; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.clients-chat-header span { min-height: 16px; color: #667085; font-size: 12px; }
.clients-chat-header .clients-chat-icon-button { margin-left: auto; }
.clients-chat-messages { min-height: 0; flex: 1; overflow-y: auto; padding: 24px; }
.clients-chat-composer { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 14px 18px; border-top: 1px solid #e3e8f1; background: #fff; }
.clients-chat-composer textarea { min-height: 40px; max-height: 120px; flex: 1; resize: vertical; box-sizing: border-box; padding: 10px 12px; border: 1px solid #dce3ee; border-radius: 8px; background: #f8fafc; color: #172033; font: inherit; }
.clients-chat-send { min-height: 40px; padding: 0 14px; border: 0; border-radius: 8px; background: #4299e1; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.clients-chat-send:disabled { cursor: not-allowed; opacity: .55; }
.clients-chat-composer-error { flex-basis: 100%; margin: 0; color: #b42318; font-size: 12px; }
.clients-chat-empty { display: flex; height: 100%; min-height: 220px; align-items: center; justify-content: center; gap: 8px; padding: 24px; flex-direction: column; color: #667085; text-align: center; }
.clients-chat-empty strong { color: #344054; font-size: 16px; font-weight: 600; }
.clients-chat-empty span { max-width: 280px; font-size: 13px; line-height: 1.5; }
.clients-chat-empty__icon { display: grid; width: 44px; height: 32px; margin-bottom: 4px; place-items: center; border-radius: 10px; background: #e8f2fc; color: #4299e1; font-size: 17px; letter-spacing: 3px; }
.clients-chat-empty--sidebar { min-height: 120px; font-size: 13px; }
.clients-chat-empty--messages { min-height: 100%; }
body.clients-chat-is-open { overflow: hidden; }
@media (max-width: 900px) {
  .clients-chat-drawer { width: 100vw; }
  .clients-chat-sidebar { flex-basis: 280px; }
}
@media (max-width: 620px) {
  .clients-chat-sidebar { flex-basis: 250px; }
  .clients-chat-fab { right: 16px; bottom: 16px; }
  .clients-chat-composer { padding: 12px; }
  .clients-chat-send { padding: 0 10px; }
}

.clients-chat-item__meta { display: flex; min-width: 30px; align-self: stretch; align-items: flex-end; flex-direction: column; gap: 6px; padding-top: 2px; }
.clients-chat-item__meta time { color: #98a2b3; font-size: 11px; white-space: nowrap; }
.clients-chat-unread { display: inline-flex; min-width: 20px; height: 20px; align-items: center; justify-content: center; padding: 0 6px; border-radius: 999px; background: #4299e1; color: #fff; font-size: 11px; font-weight: 600; }
.clients-chat-retry { min-height: 36px; padding: 0 13px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #344054; cursor: pointer; font: inherit; }
.clients-chat-retry:hover { border-color: #4299e1; color: #246aa5; }
.clients-chat-messages { display: flex; flex-direction: column; gap: 8px; }
.chat-message, .clients-chat-message { max-width: min(72%, 680px); overflow-wrap: anywhere; border: 1px solid #e3e8f1; border-radius: 12px; padding: 10px 12px 7px; color: #172033; }
.clients-chat-message--incoming { align-self: flex-start; background: #fff; }
.clients-chat-message--outgoing { align-self: flex-end; border-color: rgb(66 153 225 / 25%); background: rgb(66 153 225 / 12%); }
.clients-chat-message--grouped { margin-top: -4px; }
.clients-chat-message__text, .clients-chat-message__caption { white-space: pre-wrap; line-height: 1.45; }
.clients-chat-message__caption { margin-top: 8px; font-size: 13px; }
.clients-chat-message footer { margin-top: 7px; color: #98a2b3; font-size: 11px; text-align: right; }
.clients-chat-media-image { display: block; max-width: 360px; max-height: 420px; border-radius: 10px; object-fit: contain; }
.clients-chat-media-video { display: block; width: min(360px, 100%); max-height: 420px; border-radius: 10px; }
.clients-chat-media-fallback { color: #667085; font-size: 13px; }
.clients-chat-file { display: flex; max-width: 300px; align-items: center; gap: 8px; color: #246aa5; font-weight: 600; text-decoration: none; }
.clients-chat-file:hover { text-decoration: underline; }
.clients-chat-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clients-chat-file small { margin-left: auto; color: #98a2b3; font-size: 11px; font-weight: 400; white-space: nowrap; }

.clients-chat-composer { align-items: flex-end; }
.clients-chat-attach { flex: 0 0 40px; width: 40px; min-width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: #fff; font-size: 18px; }
.clients-chat-attach:hover { background: #f8fafc; }
.clients-chat-composer__body { display: grid; flex: 1 1 auto; min-width: 0; gap: 6px; }
.clients-chat-attachments { display: flex; max-width: 100%; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 2px 0 4px; scrollbar-width: thin; }
.clients-chat-attachment { position: relative; display: grid; min-width: 140px; max-width: 220px; padding: 7px 8px; border: 1px solid #dce3ee; border-radius: 8px; background: #fff; }
.clients-chat-attachment--preview { flex: 0 0 72px; width: 72px; height: 72px; padding: 0; overflow: hidden; border-radius: 10px; background: #f8fafc; }
.clients-chat-attachment__preview-image, .clients-chat-attachment__preview-video { display: block; width: 100%; height: 100%; object-fit: cover; }
.clients-chat-attachment--preview .clients-chat-attachment__remove { position: absolute; top: 4px; right: 4px; display: grid; width: 20px; min-width: 20px; height: 20px; min-height: 20px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: rgb(15 23 42 / 78%); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.clients-chat-attachment__video-label { position: absolute; left: 5px; bottom: 5px; padding: 2px 5px; border-radius: 999px; background: rgb(15 23 42 / 72%); color: #fff; font-size: 9px; line-height: 1; }
.clients-chat-attachment--file { display: grid; grid-template-columns: 34px minmax(0, 1fr) 24px; flex: 0 0 210px; min-height: 58px; padding: 8px; align-items: center; gap: 8px; border-radius: 10px; }
.clients-chat-attachment__file-icon, .clients-chat-file__icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: rgb(66 153 225 / 10%); color: #4299e1; }
.clients-chat-attachment__file-icon svg, .clients-chat-file__icon svg { width: 22px; height: 22px; }
.clients-chat-attachment__file-copy { display: grid; min-width: 0; gap: 2px; }
.clients-chat-attachment__file-copy strong { overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.clients-chat-attachment__file-copy small { color: #98a2b3; font-size: 10px; }
.clients-chat-attachment--file .clients-chat-attachment__remove { display: grid; width: 22px; min-width: 22px; height: 22px; min-height: 22px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #667085; cursor: pointer; }
.clients-chat-attachment > span { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.clients-chat-attachment > small { color: #98a2b3; font-size: 10px; }
.clients-chat-media-image { display: block; width: min(320px, 100%); max-height: 360px; object-fit: cover; border-radius: 10px; }
.clients-chat-media-video { display: block; width: min(360px, 100%); max-height: 420px; border-radius: 10px; background: #000; }
.clients-chat-video-note { display: block; width: 220px; height: 220px; max-width: 70vw; max-height: 70vw; border-radius: 50%; background: #000; object-fit: cover; }
.clients-chat-audio { --audio-progress: 0%; position: relative; display: flex; width: min(310px, 72vw); min-width: 245px; padding: 5px 8px; align-items: center; gap: 8px; border-radius: 10px; }
.clients-chat-message--incoming .clients-chat-audio { background: #f4f7fb; }
.clients-chat-message--outgoing .clients-chat-audio { background: rgb(66 153 225 / 10%); }
.clients-chat-audio__engine { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.clients-chat-audio__play { display: grid; flex: 0 0 32px; width: 32px; min-width: 32px; height: 32px; min-height: 32px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: #4299e1; color: #fff; cursor: pointer; transition: transform .14s ease, box-shadow .14s ease, background .14s ease; }
.clients-chat-audio__play:hover { background: #3182ce; box-shadow: 0 4px 12px rgb(66 153 225 / 28%); }
.clients-chat-audio__play:active { transform: scale(.95); }
.clients-chat-audio__play svg { width: 15px; height: 15px; }
.clients-chat-audio__play-icon { margin-left: 2px; }
.clients-chat-audio__content { display: grid; flex: 1 1 auto; min-width: 0; gap: 3px; }
.clients-chat-audio__top { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; }
.clients-chat-audio__label { overflow: hidden; color: #172033; font-size: 11px; font-weight: 600; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.clients-chat-audio__type { flex: 0 0 auto; color: #98a2b3; font-size: 9px; line-height: 1; }
.clients-chat-audio__controls { display: grid; grid-template-columns: minmax(90px, 1fr) auto auto; align-items: center; gap: 5px; }
.clients-chat-audio__progress { width: 100%; height: 14px; margin: 0; padding: 0; appearance: none; border: 0; border-radius: 999px; outline: none; background: transparent; cursor: pointer; }
.clients-chat-audio__progress::-webkit-slider-runnable-track { height: 3px; border-radius: 999px; background: linear-gradient(to right, #4299e1 0, #4299e1 var(--audio-progress), #d9e2ec var(--audio-progress), #d9e2ec 100%); }
.clients-chat-audio__progress::-webkit-slider-thumb { width: 10px; height: 10px; margin-top: -3.5px; appearance: none; border: 2px solid #fff; border-radius: 50%; background: #4299e1; box-shadow: 0 1px 3px rgb(15 23 42 / 18%); }
.clients-chat-audio__progress::-moz-range-track { height: 3px; border: 0; border-radius: 999px; background: #d9e2ec; }
.clients-chat-audio__progress::-moz-range-progress { height: 3px; border-radius: 999px; background: #4299e1; }
.clients-chat-audio__progress::-moz-range-thumb { width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: #4299e1; box-shadow: 0 1px 3px rgb(15 23 42 / 18%); }
.clients-chat-audio__time, .clients-chat-audio__duration { color: #667085; font-variant-numeric: tabular-nums; font-size: 9px; line-height: 1; white-space: nowrap; }
.clients-chat-audio__duration::before { content: "/"; margin-right: 4px; color: #b0b8c4; }
@media (max-width: 640px) { .clients-chat-audio { width: 100%; min-width: 0; } .clients-chat-audio__type { display: none; } }
.clients-chat-media-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; width: min(360px, 100%); overflow: hidden; border-radius: 10px; }
.clients-chat-media-group__item { display: block; min-width: 0; aspect-ratio: 1; overflow: hidden; background: #111827; }
.clients-chat-media-group__item img, .clients-chat-media-group__item video { display: block; width: 100%; height: 100%; object-fit: cover; }
.clients-chat-message--album { max-width: min(72%, 680px); }
.clients-chat-file { display: flex; align-items: center; gap: 8px; min-width: 180px; max-width: 320px; padding: 10px; border: 1px solid #dce3ee; border-radius: 9px; background: #fff; }
.clients-chat-file > span:not(.clients-chat-file__icon) { overflow: hidden; flex: 1; text-overflow: ellipsis; white-space: nowrap; }
.clients-chat-file small { flex: 0 0 auto; color: #98a2b3; }
