:root {
  --bg: #eeeae7;
  --panel: rgba(255,255,255,.9);
  --solid: #ffffff;
  --ink: #302c2a;
  --muted: #756d69;
  --line: #ded8d4;
  --cyan: #f05342;
  --cyan-soft: #f5d0cb;
  --green: #12b879;
  --green-soft: #e1f8ee;
  --yellow: #ffe7a3;
  --red: #e85e50;
  --purple: #e77f72;
  --shadow: 0 22px 60px rgba(48, 44, 42, .15);
}

/* Friends ENERGYM — loyalty board and gift dialogs */
#friends .client-table {
  overflow: hidden;
  border: 1px solid #ded8d4;
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0, rgba(158, 63, 52, .09), transparent 310px),
    #fff;
  box-shadow: 0 18px 42px rgba(48, 44, 42, .07);
}

#friends .section-head {
  margin-bottom: 6px;
  padding-bottom: 0;
  border-bottom: 0;
}

#friends .section-head p {
  margin-bottom: 5px;
  color: #9e3f34;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

#friends .section-head h2 {
  font-size: clamp(23px, 2vw, 30px);
  letter-spacing: -.035em;
}

#friends > .friends-layout .settings-hint {
  max-width: 900px;
  margin: 0 0 18px;
  color: #756d69;
  line-height: 1.55;
}

#friends .partner-summary {
  gap: 12px;
  margin-bottom: 14px;
}

#friends .partner-summary article,
#friends .partner-summary button {
  position: relative;
  min-height: 94px;
  overflow: hidden;
  padding: 17px 19px;
  border: 1px solid #ded8d4;
  border-radius: 16px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 7px 18px rgba(48, 44, 42, .045);
}

#friends .partner-summary article::after,
#friends .partner-summary button::after {
  position: absolute;
  right: -18px;
  bottom: -24px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: rgba(158, 63, 52, .08);
  content: "";
}

#friends .partner-summary article:nth-child(2) {
  border-color: #bde7d5;
  background: linear-gradient(135deg, #effbf5 0%, #fff 78%);
}

#friends .partner-summary button {
  color: #fff;
  text-align: left;
  cursor: pointer;
  background: linear-gradient(135deg, #302c2a 0%, #302c2a 100%);
  transition: transform .18s ease, box-shadow .18s ease;
}

#friends .partner-summary button::after { background: rgba(231, 127, 114, .15); }
#friends .partner-summary button:hover { transform: translateY(-2px); box-shadow: 0 12px 25px rgba(48, 44, 42, .18); }

#friends .partner-summary span {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 7px;
  color: #756d69;
  font-size: 12px;
  font-weight: 750;
}

#friends .partner-summary button span { color: #c2bab6; }

#friends .partner-summary b {
  position: relative;
  z-index: 1;
  font-size: 25px;
  line-height: 1;
  letter-spacing: -.035em;
}

#friends .partner-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  max-height: calc(100vh - 460px);
  min-height: 290px;
  padding: 3px 6px 5px 2px;
  scrollbar-color: #c2bab6 transparent;
}

#friends .friends-search {
  display: grid;
  gap: 6px;
  max-width: 420px;
  margin: 0 0 12px;
  color: #756d69;
  font-size: 12px;
  font-weight: 750;
}

#friends .friends-search input {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #ded8d4;
  border-radius: 12px;
  background: #fff;
  color: #302c2a;
  font: inherit;
}

#friends .friends-search input:focus {
  outline: none;
  border-color: #9e3f34;
  box-shadow: 0 0 0 3px rgba(158, 63, 52, .12);
}

#friends .friends-pager {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

#friends .js-friends-list + .friends-pager {
  margin: 10px 0 0;
}

#friends .friends-pager[hidden] {
  display: none;
}

#friends .friends-pager button {
  min-height: 32px;
  min-width: 32px;
  padding: 0 10px;
  border: 1px solid #ded8d4;
  border-radius: 10px;
  background: #fff;
  color: #302c2a;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

#friends .friends-pager button:disabled {
  opacity: .45;
  cursor: default;
}

#friends .friends-pager button.active {
  border-color: #9e3f34;
  background: #fff2f0;
  color: #302c2a;
}

#friends .friends-pager-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#friends .friends-pager small {
  color: #756d69;
  font-size: 12px;
  font-weight: 700;
}

#friends .partner-row {
  min-height: 70px;
  padding: 12px 14px;
  border: 1px solid #ded8d4;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 11px rgba(48, 44, 42, .035);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

#friends .partner-row:hover {
  z-index: 1;
  border-color: #e77f72;
  background: #fff2f0;
  box-shadow: 0 9px 20px rgba(48, 44, 42, .1);
  transform: translateY(-1px);
}

#friends .partner-row.active {
  border-color: #9e3f34;
  background: linear-gradient(135deg, #fff2f0, #fff);
  box-shadow: 0 0 0 3px rgba(158, 63, 52, .1);
}

#friends .partner-row > span { min-width: 0; }

#friends .partner-row strong {
  overflow: hidden;
  color: #302c2a;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#friends .partner-row small {
  margin-top: 5px;
  color: #756d69;
  font-size: 11px;
}

#friends .partner-row > b {
  min-width: 82px;
  padding: 8px 10px;
  border-radius: 11px;
  color: #302c2a;
  font-size: 15px;
  text-align: right;
  background: #fff2f0;
}

#friends .partner-row > b small {
  color: #756d69;
  font-size: 10px;
}

.js-friends-gift-modal .client-card-modal,
.js-friends-issued-modal .client-card-modal {
  display: flex;
  flex-direction: column;
  width: min(760px, calc(100vw - 32px));
  max-height: min(88vh, 820px);
  overflow: hidden;
  border: 1px solid #ded8d4;
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(48, 44, 42, .24);
}

.js-friends-gift-modal .client-card-modal-head,
.js-friends-issued-modal .client-card-modal-head {
  flex: 0 0 auto;
  padding: 20px 22px;
  border-bottom: 1px solid #ded8d4;
  background: linear-gradient(135deg, #fff2f0 0%, #fff 70%);
}

.js-friends-gift-modal .photo,
.js-friends-issued-modal .photo {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 0;
  border-radius: 15px;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  background: linear-gradient(145deg, #9e3f34, #302c2a);
  box-shadow: 0 8px 18px rgba(158, 63, 52, .24);
}

.js-friends-gift-modal .client-top p:first-of-type,
.js-friends-issued-modal .client-top p:first-of-type {
  color: #9e3f34;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.js-friends-gift-modal .client-top h2,
.js-friends-issued-modal .client-top h2 { margin: 2px 0 3px; letter-spacing: -.025em; }

.js-friends-gift-modal .client-card-modal-body,
.js-friends-issued-modal .client-card-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 20px 22px 24px;
  background: #faf8f6;
}

.js-friends-gift-modal .loyalty-progress {
  gap: 13px;
  padding: 17px;
  border: 1px solid #ded8d4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(48, 44, 42, .055);
}

.js-friends-gift-modal .loyalty-progress > p:first-child {
  margin: 0;
  padding: 11px 13px;
  border-radius: 11px;
  color: #4f4946;
  background: #eeeae7;
}

.js-friends-gift-modal .loyalty-progress > p:first-child b { color: #302c2a; }

.js-friends-gift-modal .loyalty-spend-hint {
  padding-left: 2px;
  color: #302c2a;
  line-height: 1.45;
}

.js-friends-gift-modal .loyalty-gift-row {
  min-height: 70px;
  padding: 12px 13px;
  border-radius: 13px;
  background: #faf8f6;
}

.js-friends-gift-modal .loyalty-gift-row.ready {
  border-color: #91d7bd;
  background: linear-gradient(135deg, #edf9f3, #fff);
}

.js-friends-gift-modal .loyalty-gift-row.order {
  border-color: #e2b15a;
  background: linear-gradient(135deg, #fff8ea, #fff);
}

.js-friends-gift-modal .loyalty-gift-row .confirm {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
}

.js-friends-gift-modal .client-card-section,
.js-friends-issued-modal .partner-details {
  border-radius: 16px;
}

.js-friends-gift-modal .client-card-section h3 { margin-bottom: 12px; }

.js-friends-issued-modal .partner-detail-row,
.js-friends-gift-modal .partner-detail-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 11px 12px;
  border: 1px solid #ded8d4;
  border-radius: 12px;
  background: #fff;
}

@media (max-width: 900px) {
  #friends .partner-list { grid-template-columns: 1fr; max-height: none; }
  #friends .partner-summary,
  .friends-layout .partner-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  #friends .partner-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #friends .partner-summary article,
  #friends .partner-summary button { min-height: 76px; }
  .js-friends-gift-modal .client-card-modal-body,
  .js-friends-issued-modal .client-card-modal-body { padding: 14px; }
  .js-friends-gift-modal .loyalty-gift-row { grid-template-columns: 1fr auto; }
  .js-friends-gift-modal .loyalty-gift-row span { grid-column: 1 / -1; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(240, 83, 66, .18), transparent 28%),
    linear-gradient(320deg, rgba(231, 127, 114, .13), transparent 30%),
    var(--bg);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.crm {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: start;
  min-height: 100vh;
  height: auto;
  overflow: visible;
  padding: 20px;
  gap: 18px;
}

.rail {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: var(--solid);
  box-shadow: var(--shadow);
}

.brand {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #ff7a3d, #ffb23e);
  border-radius: 8px;
  font-weight: 950;
}

.rail-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
}

.rail-btn.active {
  background: var(--cyan-soft);
  color: #9e3f34;
}

.rail-btn.bottom { margin-top: auto; }

.screen {
  min-width: 0;
  overflow: visible;
  height: auto;
}

.topbar {
  display: grid;
  grid-template-columns: max-content 50px minmax(140px, .7fr) minmax(160px, 1fr) max-content max-content max-content 46px 46px;
  gap: 10px;
  align-items: center;
  height: 58px;
  margin-bottom: 14px;
}

.work-date-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: -4px 0 14px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.work-date-row > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.work-date-row input[type="date"] {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

.work-date-row button {
  min-height: 38px;
  min-width: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 900;
}

.work-date-row .js-work-date-today {
  background: #302c2a;
  color: #fff;
  border-color: #302c2a;
}

.work-date-row b {
  font-size: 13px;
}

.work-date-row.not-today {
  border-color: #f59e0b;
  background: #fff7ed;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 22px; letter-spacing: .5px; }
h2 { margin-bottom: 0; font-size: 24px; }
h3 { margin-bottom: 10px; font-size: 16px; }

.search,
.status-pill,
.profile,
.calendar-panel,
.work-modal,
.quick-panel,
.client-table,
.client-card,
.empty-board {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
}

.search span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.status-pill,
.profile {
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0 14px;
  color: #302c2a;
  font-weight: 850;
}

.status-pill.green {
  color: #087a50;
  background: var(--green-soft);
}

.status-pill.day-status-line,
.status-pill.js-cash-total {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.status-pill.day-status-line {
  max-width: 100%;
}

.birthday-gift {
  position: relative;
  min-width: 48px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.birthday-gift span {
  font-size: 18px;
}

.birthday-gift b {
  position: absolute;
  right: -5px;
  top: -7px;
  min-width: 20px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #eeeae7;
  color: var(--muted);
  font-size: 11px;
}

.birthday-gift.has-items b {
  background: #f43f5e;
  color: #fff;
}

.shift-header-button {
  border: 1px solid #b7ebcd;
  justify-content: center;
  white-space: nowrap;
}

.profile {
  gap: 8px;
  padding-right: 8px;
}

.profile-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.profile-meta strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.profile-meta small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.profile .js-logout {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.profile span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333, #999);
}

.mobile-quick {
  display: none;
}

.view { display: none; }
.view.active { display: block; }

.list-scroll,
.js-today-flow-list,
.js-visits-register,
.js-tickets-register,
.js-product-grid,
.js-certificates-list,
.js-partner-list,
.js-friends-list {
  max-height: calc(100vh - 280px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

#finance .js-cashbox-register,
#finance .cash-register {
  max-height: none;
  overflow: visible;
}

.js-today-flow-list {
  max-height: min(48vh, 520px);
}

.clients-list-scroll {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.clients-list-scroll .table-row.head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff2f0;
}

.clients-table-row > :first-child {
  padding-left: 14px;
}

.day-layout {
  display: grid;
  grid-template-columns: minmax(620px, 1fr) 310px;
  gap: 14px;
  align-items: start;
}

.day-layout > .calendar-panel,
.day-layout > .work-modal,
.day-layout > .quick-panel {
  display: none;
}

.home-desk,
.home-checkout {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.home-desk {
  padding: 18px;
}

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

.home-head p,
.mini-title p {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

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

.home-stats span {
  min-height: 30px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff2f0;
  color: #4f4946;
  font-size: 12px;
  font-weight: 900;
}

.desk-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.desk-actions-legacy {
  display: none !important;
}

.attention-board[hidden],
.control-strip[hidden],
.home-checkout .shift-desk[hidden] {
  display: none !important;
}

.attention-empty {
  grid-column: 1 / -1;
  padding: 6px 10px;
  border: 1px solid #cfe9d9;
  border-radius: 8px;
  background: linear-gradient(135deg, #eaf8f1, #f8fdfa);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 8px;
  box-sizing: border-box;
}

.attention-empty strong {
  color: #087454;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.attention-empty span {
  color: #4f7a68;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.control-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.control-strip article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.control-strip span,
.control-strip strong {
  display: block;
}

.control-strip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.control-strip strong {
  margin-top: 5px;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attention-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
  max-height: 84px;
  overflow: auto;
  padding: 5px;
  border: 1px solid #ded8d4;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff2f0, #fff);
  box-shadow: 0 4px 12px rgba(48, 44, 42, .04);
  box-sizing: border-box;
}

.attention-board button {
  position: relative;
  display: grid;
  gap: 0;
  align-content: center;
  min-height: 32px;
  max-height: 36px;
  border: 1px solid #eeeae7;
  border-radius: 8px;
  padding: 4px 8px 4px 11px;
  background: #fff;
  color: #302c2a;
  text-align: left;
  box-sizing: border-box;
  min-width: 0;
  box-shadow: none;
  transition: border-color .15s ease, background .15s ease;
}

.attention-board button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 99px;
  background: #eda89f;
}

.attention-board button strong {
  color: #302c2a;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attention-board button.warn {
  border-color: #ead9a8;
  background: #fffaf0;
}

.attention-board button.warn::before {
  background: #e0b84a;
}

.attention-board button.danger {
  border-color: #efcfc9;
  background: #fff8f7;
}

.attention-board button.danger::before {
  background: #e07a6e;
}

.attention-board button.ok {
  border-color: #cfe9d9;
  background: #f6fcf8;
}

.attention-board button.ok::before {
  background: #16a06f;
}

.attention-board button:hover {
  border-color: #eda89f;
}

.attention-board span {
  color: #756d69;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attention-friends-order {
  position: relative;
  display: grid;
  gap: 0;
  align-content: center;
  min-height: 32px;
  max-height: 36px;
  padding: 4px 8px 4px 11px;
  border: 1px solid #ead9a8;
  border-radius: 8px;
  background: #fffaf0;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  min-width: 0;
  box-shadow: none;
}

.attention-friends-order::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 99px;
  background: #e0b84a;
}

.attention-friends-order strong {
  color: #302c2a;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attention-client-link {
  justify-self: start;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #9e3f34;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.attention-client-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.attention-order-note {
  display: none;
}

.desk-action,
.lookup-row button,
.found-profile button,
.visit-options button,
.main-submit,
.pay-tabs button,
.pay-submit,
.fast-goods button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.desk-action {
  display: grid;
  gap: 5px;
  min-height: 76px;
  padding: 12px;
  text-align: left;
}

.desk-action span {
  color: var(--muted);
  font-size: 12px;
}

.desk-action.active {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

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

.client-workbench,
.today-flow,
.checkout-box,
.fast-goods {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.client-workbench,
.today-flow {
  padding: 16px;
}

.mini-title {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.mini-title > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #302c2a;
  color: #fff;
  font-weight: 950;
}

.mini-title h3 {
  margin-bottom: 2px;
}

.lookup-row {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 10px;
  margin-bottom: 12px;
}

.lookup-row label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.lookup-row button {
  align-self: end;
  min-height: 42px;
  background: #302c2a;
  color: #fff;
  border-color: #302c2a;
}

.found-profile {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: var(--green-soft);
}

.found-profile-body {
  min-width: 0;
}

.found-profile span,
.found-profile .js-found-meta {
  display: block;
  margin-top: 4px;
  color: #507266;
}

.found-profile-alerts {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.found-profile-alerts[hidden] {
  display: none;
}

.found-alert {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.found-alert.debt {
  border: 1px solid #f3b4b4;
  background: #fff5f5;
  color: #9b1c1c;
}

.found-alert.note {
  border: 1px solid #eda89f;
  background: #fff2f0;
  color: #302c2a;
}

.found-profile button {
  min-height: 36px;
  padding: 0 12px;
}

.search-suggestions {
  display: grid;
  gap: 8px;
  margin: -2px 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.search-suggestions[hidden] {
  display: none;
}

.search-suggestions > strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.search-suggestions button {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 7px;
  padding: 8px 10px;
  background: #fff2f0;
  color: var(--ink);
  text-align: left;
}

.search-suggestions button:hover {
  background: var(--cyan-soft);
}

.search-suggestions span {
  font-weight: 900;
}

.search-suggestions small {
  color: var(--muted);
}

.search-empty {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 7px;
  background: #fff6dc;
  color: #7a5a09;
}

.search-empty span {
  font-weight: 900;
}

.client-create-panel {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #f5d0cb;
  border-radius: 8px;
  background: #fff2f0;
}

.client-create-panel[hidden] {
  display: none;
}

.client-create-modal.client-create-panel {
  margin: 0;
  border: 0;
  background: #fff;
}

.client-create-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.client-create-modal {
  width: min(720px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  padding: 16px 18px 18px;
  display: grid;
  gap: 12px;
}

.client-create-modal .client-create-head {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: -4px 0 0;
  padding-bottom: 8px;
  background: #fff;
}

.client-create-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.client-create-desk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.js-client-create-modal[data-mode="registry"] .js-client-create-desk-actions,
.js-client-create-modal[data-mode="registry"] .js-free-visit-note {
  display: none;
}

.client-create-head span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-create-head button,
.client-create-actions button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
}

.client-create-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.client-create-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.client-create-form input,
.client-create-form select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.client-create-duplicates {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #ffd6a8;
  border-radius: 8px;
  background: #fff8ef;
}

.client-create-duplicates[hidden] {
  display: none;
}

.client-create-duplicates strong {
  color: #9a4f00;
}

.client-create-duplicates button {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  padding: 8px 10px;
  background: #fff;
  text-align: left;
}

.client-create-duplicates small {
  color: var(--muted);
}

.duplicates-panel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.debts-panel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

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

.duplicates-head p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.duplicates-head h3 {
  margin: 0;
  font-size: 18px;
}

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

.duplicates-empty {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #faf8f6;
  font-size: 13px;
}

.duplicate-group {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.duplicate-group-head,
.duplicate-client,
.duplicate-merge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.duplicate-group-head span {
  font-weight: 950;
}

.duplicate-group-head b {
  color: var(--muted);
  font-size: 12px;
}

.duplicate-clients {
  display: grid;
  gap: 7px;
}

.duplicate-client,
.duplicate-merge {
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.duplicate-client.target {
  border-color: var(--green);
  background: #effaf4;
  box-shadow: inset 3px 0 0 var(--green);
}

.duplicate-client span {
  display: grid;
  gap: 2px;
}

.duplicate-client strong {
  font-size: 13px;
}

.duplicate-client small,
.duplicate-client em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.duplicate-merge {
  justify-content: center;
  border-color: #302c2a;
  background: #302c2a;
  color: #fff;
  font-weight: 900;
}

.duplicate-merge:disabled {
  opacity: .55;
  cursor: default;
}

.debts-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.debt-client-row {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #ffd0c9;
  border-radius: 8px;
  background: #fff7f6;
  color: var(--ink);
  text-align: left;
}

.debt-client-row span,
.debt-client-row small,
.debt-client-row strong {
  display: block;
}

.debt-client-row small {
  color: var(--muted);
  font-size: 11px;
}

.debt-client-row b {
  color: var(--red);
  white-space: nowrap;
}

.client-create-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.client-create-actions .primary {
  background: #302c2a;
  border-color: #302c2a;
  color: #fff;
}

.client-create-actions .danger {
  background: #fff1f1;
  border-color: #ffcaca;
  color: #9b1c1c;
}

.desk-pass-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.desk-pass-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.desk-pass-head b {
  color: var(--green);
}

.desk-pass-empty {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 7px;
  background: #fff2f0;
  color: var(--muted);
  font-size: 13px;
}

.desk-pass-empty strong,
.desk-pass-empty span {
  display: block;
}

.desk-pass-empty strong {
  color: var(--ink);
}

.desk-pass-empty div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.desk-pass-empty button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.desk-pass-empty .pending-pay {
  border-color: #f59e0b;
  background: #fff7ed;
  color: #b45309;
}

.desk-pass-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  width: 100%;
  min-height: 56px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff2f0;
  color: var(--ink);
  text-align: left;
}

.desk-pass-item.active {
  border-color: var(--cyan);
  background: var(--cyan-soft);
  box-shadow: inset 0 0 0 1px var(--cyan);
}

.desk-pass-item span {
  font-weight: 950;
}

.desk-pass-item b {
  color: var(--green);
}

.desk-pass-item small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.desk-pass-item.time-warn {
  border-color: #ffd56a;
  background: #fff9e8;
}

.desk-pass-item.is-frozen {
  border-color: #f05342;
  background: #fff2f0;
}

.desk-pass-actions-focused {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.desk-pass-actions-focused button {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.desk-pass-actions-focused .primary {
  grid-column: 1 / -1;
  min-height: 54px;
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.desk-secondary-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.desk-pass-actions-focused .pending-pay {
  border-color: #f59e0b;
  background: #fff7ed;
  color: #b45309;
}

.desk-pass-warning {
  grid-column: 1 / -1;
  padding: 9px 10px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fff7ed;
  color: #92400e;
  font-size: 12px;
  font-weight: 900;
}

.desk-student-proof-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.desk-student-proof-warning label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  white-space: nowrap;
  cursor: pointer;
}

.desk-student-proof-warning input {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
}

.desk-pass-warning.comment-note {
  border-color: #ded8d4;
  background: #fff2f0;
  color: #302c2a;
  font-weight: 750;
}

.desk-pass-warning.note-alert {
  border-color: #eda89f;
  background: #fff2f0;
  color: #302c2a;
  font-weight: 750;
}

.desk-pass-empty > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.desk-pass-empty > div button {
  min-height: 44px;
}

.visit-options {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.visit-options button {
  display: grid;
  gap: 8px;
  min-height: 78px;
  padding: 12px;
  text-align: left;
}

.visit-options span {
  color: var(--muted);
  font-size: 12px;
}

.visit-options .selected {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

.main-submit,
.pay-submit {
  width: 100%;
  min-height: 52px;
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.today-flow article {
  display: grid;
  grid-template-columns: 64px minmax(180px, 1fr) minmax(220px, auto) 34px;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  border-top: 1px solid var(--line);
}

.today-flow article:first-of-type {
  border-top: 0;
}

.today-flow time {
  color: var(--cyan);
  font-weight: 950;
}

.flow-client {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.flow-client strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-delete {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
}

.today-flow b {
  display: grid;
  gap: 3px;
  color: var(--green);
  font-size: 13px;
  line-height: 1.35;
  text-align: right;
}

.today-flow b em {
  color: inherit;
  font-style: normal;
  font-weight: 950;
}

.today-flow b small,
.today-flow span small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.today-flow .warn b {
  color: var(--red);
}

.certificate-pay-modal-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.certificate-remainder {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8ef;
}

.certificate-remainder[hidden] {
  display: none;
}

.certificate-split-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.certificate-split-summary div {
  display: grid;
  gap: 2px;
}

.certificate-split-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.certificate-split-summary strong {
  font-size: 16px;
}

.pay-tabs-compact button {
  min-height: 32px;
  font-size: 12px;
}

.home-checkout {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.shift-desk {
  display: grid;
  gap: 10px;
}

.shift-desk .checkout-head {
  margin-bottom: 0;
}

.shift-desk .checkout-head strong {
  font-size: 18px;
}

.shift-desk-summary {
  display: grid;
  gap: 8px;
}

.shift-desk-summary article {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
}

.shift-desk-summary span,
.shift-desk-summary small {
  color: var(--muted);
  font-size: 11px;
}

.shift-desk-summary b {
  font-size: 16px;
}

.shift-desk-summary .ok {
  border-color: #b7ebcd;
  background: #f1fbf5;
}

.shift-desk-summary .warn {
  border-color: #ffd56a;
  background: #fff9e8;
}

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

.shift-desk-grid label,
.shift-order {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.shift-desk-grid input,
.shift-order input {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.shift-balance {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.shift-balance article {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
}

.shift-balance article.ok {
  border-color: #b7ebcd;
  background: #f1fbf5;
}

.shift-balance article.warn {
  border-color: #ffd56a;
  background: #fff9e8;
}

.shift-balance span,
.shift-balance small {
  color: var(--muted);
  font-size: 11px;
}

.shift-desk-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.shift-desk-actions .confirm {
  margin-top: 0;
  min-height: 44px;
}

.shift-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(48, 44, 42, .42);
  backdrop-filter: blur(8px);
}

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

.shift-modal-card {
  width: min(760px, 100%);
  max-height: min(92vh, 780px);
  overflow: auto;
  display: grid;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 10px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(48, 44, 42, .28);
}

.report-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(48, 44, 42, .42);
  backdrop-filter: blur(8px);
}

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

.report-modal-card {
  width: min(860px, 100%);
  max-height: min(92vh, 780px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(48, 44, 42, .28);
}

.report-modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.report-modal-head p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-modal-head h2 {
  font-size: 24px;
}

.report-modal-body {
  padding: 18px;
}

.report-modal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.report-modal-summary article,
.report-modal-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 14px;
}

.report-modal-summary span,
.report-modal-summary small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.report-modal-summary b {
  display: block;
  margin: 5px 0;
  font-size: 18px;
}

.report-modal-block {
  margin-top: 12px;
}

.report-modal-block h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.report-modal-block p {
  margin: 0;
  color: var(--muted);
}

.report-visitors {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.birthday-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 86;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(48, 44, 42, .42);
  backdrop-filter: blur(8px);
}

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

.birthday-modal-card {
  width: min(560px, 100%);
  max-height: min(92vh, 760px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(48, 44, 42, .28);
}

.birthday-template-field {
  display: grid;
  gap: 6px;
  padding: 0 18px;
}

.birthday-template-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.birthday-template-field textarea,
.js-birthday-template {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
}

.birthday-person {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.birthday-person-open {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
}

.birthday-send {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.birthday-send a,
.birthday-send button {
  width: auto;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.birthday-modal-list {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.birthday-modal-list button,
.referrer-suggestions button,
.partner-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.birthday-modal-list button,
.referrer-suggestions button {
  padding: 12px;
}

.birthday-modal-list span,
.birthday-modal-list small,
.referrer-suggestions span,
.referrer-suggestions small {
  display: block;
}

.birthday-modal-list small,
.referrer-suggestions small {
  margin-top: 4px;
  color: var(--muted);
}

.birthday-empty,
.partner-empty {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #faf8f6;
}

.referrer-suggestions {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.referrer-suggestions[hidden] {
  display: none;
}

.free-visit-note {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #faf8f6;
}

.free-visit-note span {
  color: var(--muted);
  font-size: 12px;
}

.free-visit-note.ok {
  border-color: #b7ebcd;
  background: var(--green-soft);
}

.free-visit-note.warn {
  border-color: #ffd56a;
  background: #fff9e8;
}

.shift-modal-head,
.shift-modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.shift-modal-head p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.shift-modal-head h2 {
  font-size: 24px;
}

.shift-modal-overlay.mode-open .shift-modal-head {
  justify-content: flex-end;
  margin-bottom: -6px;
}

.shift-modal-overlay.mode-open .shift-modal-head > div {
  display: none;
}

.shift-open-form,
.shift-close-form {
  display: grid;
  gap: 12px;
}

.shift-open-form[hidden],
.shift-close-form[hidden],
.shift-modal-overlay.mode-open .shift-close-form,
.shift-modal-overlay.mode-close .shift-open-form {
  display: none !important;
}

.shift-modal-overlay.mode-open .shift-modal-actions {
  display: block;
}

.shift-modal-note {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #b7ebcd;
  border-radius: 8px;
  background: #f1fbf5;
}

.shift-modal-note span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.shift-modal-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.shift-modal-field input {
  min-height: 52px;
  font-size: 20px;
  font-weight: 950;
}

.shift-modal-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.shift-open-form .shift-modal-totals,
.js-shift-open-check {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.js-shift-open-check .shift-open-cash b {
  font-variant-numeric: tabular-nums;
}

.shift-open-cash {
  display: grid;
  gap: 4px;
  min-height: 58px;
  align-content: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
}

.shift-open-cash span,
.shift-open-cash small {
  color: var(--muted);
  font-size: 11px;
}

.shift-open-cash b {
  font-size: 20px;
}

.shift-modal-totals article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
}

.shift-modal-totals span,
.shift-modal-totals small {
  color: var(--muted);
  font-size: 11px;
}

.shift-modal-totals b {
  font-size: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shift-modal-actions {
  align-items: center;
  justify-content: flex-end;
}

.shift-modal-actions button {
  min-height: 44px;
  min-width: 138px;
}

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

.shift-tags button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.checkout-box,
.fast-goods {
  padding: 14px;
}

.checkout-head,
.checkout-line,
.fast-goods button {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.checkout-head {
  margin-bottom: 12px;
}

.checkout-head span,
.checkout-line span {
  color: var(--muted);
}

.checkout-line span small {
  display: block;
  margin-top: 3px;
  color: #9a6b00;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkout-line span small.checkout-client {
  color: var(--muted);
  font-weight: 650;
}

.checkout-line.muted b {
  color: var(--muted);
}

.checkout-head strong {
  color: var(--green);
  font-size: 28px;
}

.checkout-line {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.checkout-line button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--red);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.pay-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.pay-tabs button {
  min-height: 38px;
}

.pay-tabs .active {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

.combo-pay {
  display: grid;
  grid-template-columns: repeat(4, 1fr) .9fr;
  gap: 7px;
  margin: 10px 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
}

.combo-pay[hidden] {
  display: none;
}

.combo-pay label,
.combo-pay div {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.combo-pay input {
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.combo-pay strong {
  height: 34px;
  display: flex;
  align-items: center;
  color: var(--ink);
  font-size: 13px;
}

.cash-received,
.certificate-pay {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
}

.cash-received[hidden],
.certificate-pay[hidden] {
  display: none;
}

.cash-received label,
.certificate-pay label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.cash-received input,
.certificate-pay input {
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.cash-received div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.certificate-pay small {
  color: var(--muted);
  font-size: 12px;
}

.fast-goods,
.js-fast-goods-list {
  display: grid;
  gap: 8px;
}

.fast-goods input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.fast-product-results {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
}

.fast-product-results[hidden] {
  display: none;
}

.fast-product-empty {
  color: var(--muted);
  font-size: 12px;
}

.fast-goods button,
.js-fast-goods-list button {
  min-height: 42px;
  padding: 0 12px;
}

.calendar-panel,
.quick-panel,
.client-table,
.client-card,
.empty-board { padding: 16px; }

.calendar-head,
.section-head,
.modal-title,
.client-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.calendar-head p,
.section-head p,
.modal-title p {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 13px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 8px;
  background: #eeeae7;
}

.segmented button {
  min-height: 32px;
  border: 0;
  border-radius: 7px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.segmented .active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.timeline { display: grid; }

.hour {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px;
  min-height: 46px;
  border-top: 1px solid #eeeae7;
}

.hour span {
  padding-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-events {
  display: grid;
  gap: 6px;
  padding: 6px 0;
}

.event {
  align-self: center;
  min-height: 34px;
  width: 100%;
  border: 0;
  border-radius: 7px;
  padding: 8px 10px;
  color: #302c2a;
  font-size: 12px;
  font-weight: 850;
  text-align: left;
}

.event strong,
.event small {
  display: block;
}

.event small {
  margin-top: 2px;
  opacity: .72;
}

.event.blue { background: #f5d0cb; }
.event.cyan { background: var(--cyan-soft); }
.event.green { background: var(--green-soft); }
.event.mint { background: #dff7df; }
.event.yellow { background: var(--yellow); }
.event.purple { background: #f5d0cb; }
.event.red { background: #ffe1dd; color: #9b2b21; }

.timeline-empty {
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

.work-modal {
  display: grid;
  grid-template-columns: 1fr 210px;
  overflow: hidden;
  min-height: 560px;
}

.modal-main { padding: 18px; }

.close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #eeeae7;
  color: var(--muted);
  font-size: 22px;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

select,
input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
}

.warning {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff6dc;
  color: #7a5a09;
  font-size: 13px;
}

.warning span { color: #83692a; }

.pass-select {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.pass-select button {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  text-align: left;
}

.pass-select .active {
  border-color: var(--cyan);
  background: var(--cyan-soft);
  box-shadow: inset 0 0 0 1px var(--cyan);
}

.pass-select span,
.pass-select strong,
.pass-select b,
.pass-select small {
  display: block;
}

.pass-select span { font-size: 22px; margin-bottom: 8px; }
.pass-select b { margin-top: 6px; }
.pass-select small { margin-top: 6px; color: var(--muted); }

.discounts,
.payment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.payment-grid { grid-template-columns: repeat(4, 1fr); }

.toggle,
.payment-grid button,
.quick,
.quick-products button,
.add,
.table-row button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.toggle {
  display: flex;
  justify-content: space-between;
  padding: 0 14px;
  align-items: center;
}

.toggle.on,
.payment-grid .active {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

.receipt {
  padding: 18px 14px;
  background: #fff2f0;
  border-left: 1px solid var(--line);
}

.receipt-line,
.total {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.receipt-line span,
.total span { color: var(--muted); }

.total strong {
  color: var(--green);
  font-size: 26px;
}

.confirm {
  width: 100%;
  min-height: 58px;
  margin-top: 18px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 950;
}

.quick-panel {
  display: grid;
  gap: 10px;
}

.quick.primary {
  background: var(--cyan);
  color: #fff;
  border-color: var(--cyan);
}

.quick-products {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.quick-products button {
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
}

.client-card-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(48, 44, 42, .48);
  backdrop-filter: blur(10px);
}

.client-card-modal-overlay[hidden] {
  display: none;
}

.client-card-modal {
  width: min(920px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  display: grid;
  gap: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(48, 44, 42, .28);
}

.client-card-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.client-card-modal-head .client-top {
  margin: 0;
  flex: 1;
}

.client-card-modal-head .close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.client-card-modal-head .close:hover {
  background: #faf8f6;
  border-color: #ded8d4;
}

.client-card-modal-body {
  display: grid;
  grid-template-columns: minmax(240px, .9fr) minmax(280px, 1.1fr);
  gap: 14px;
  padding: 14px 18px 18px;
  align-items: start;
}

.client-card-modal-body-stack {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.client-card-modal-body-stack > *,
.client-card-modal-body-stack > .membership,
.client-card-modal-body-stack > .client-debt-tools,
.client-card-modal-body-stack > .client-docs,
.client-card-modal-body-stack > h3,
.client-card-modal-body-stack > .history,
.client-card-modal-body-stack > .js-client-history-list {
  grid-column: 1 / -1;
  min-width: 0;
}

.client-card-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 10px 18px 0;
  position: sticky;
  top: 67px;
  z-index: 1;
  background: #fff;
}

.client-card-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  padding: 0 10px;
}

.client-card-tabs button:hover {
  color: var(--ink);
  background: #faf8f6;
}

.client-card-tabs button.active {
  background: #302c2a;
  color: #fff;
}

.client-card-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.client-card-section > h3,
.client-card-section-head h3 {
  margin: 0;
  font-size: 14px;
}

.client-card-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.client-card-section-head em {
  font-style: normal;
  color: var(--red);
  font-weight: 800;
}

.client-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.client-debt-grid {
  grid-template-columns: minmax(120px, .6fr) minmax(180px, 1.4fr);
}

.client-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  min-width: 0;
}

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

.client-field input,
.client-field select,
.client-field textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
}

.client-field textarea,
.client-comment-field textarea {
  min-height: 72px;
  resize: vertical;
  line-height: 1.4;
}

.client-status-hint {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.client-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff2f0;
}

button.client-meta-row {
  width: 100%;
  margin: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.client-meta-row:hover {
  border-color: #302c2a;
  background: #fff;
}

button.client-meta-row strong {
  color: #302c2a;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.client-meta-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-debt-actions,
.client-module-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.client-debt-actions button {
  width: auto;
  min-height: 40px;
  margin: 0;
  padding: 0 14px;
}

.client-save-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.client-save-btn {
  width: auto;
  min-height: 40px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid #176b3a;
  border-radius: 8px;
  background: #e8f8ef;
  color: #176b3a;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.client-save-btn:hover {
  background: #176b3a;
  color: #fff;
}

.client-save-btn:disabled {
  opacity: .6;
  cursor: wait;
}

.found-profile.has-debt {
  border: 1px solid #f3b4b4;
  background: #fff5f5;
  box-shadow: inset 3px 0 0 var(--red);
}

.found-profile.has-debt span {
  color: #9b1c1c;
}

.found-profile.has-debt .quick-debt,
.found-profile.has-debt .js-found-debt-pay {
  display: inline-flex;
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.desk-pass-warning.debt-alert,
.desk-pass-actions-focused.has-debt .desk-pass-warning.debt-alert {
  border-color: #f3b4b4;
  background: #fff5f5;
  color: #9b1c1c;
  font-weight: 800;
}

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

.client-card-list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff2f0;
}

.client-card-list-item strong,
.client-card-list-item small {
  display: block;
}

.client-card-list-item small {
  margin-top: 4px;
  color: var(--muted);
}

.client-note-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.client-note-edit-form {
  width: 100%;
  display: grid;
  gap: 8px;
}

.client-note-edit-form textarea {
  width: 100%;
  min-height: 64px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.client-card-list-meta .client-note-actions button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

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

.client-tags label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff2f0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.client-tags input {
  width: auto;
  min-height: 0;
  margin: 0;
}

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

.client-visit-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 72px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff2f0;
}

.client-visit-chart i {
  flex: 1;
  min-width: 3px;
  border-radius: 2px;
  background: #eeeae7;
}

.client-visit-chart i.on {
  background: var(--accent, #f05342);
}

.client-note-form {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 4px 0 14px;
}

.client-note-form textarea {
  flex: 1;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  resize: vertical;
}

.duplicates-modes {
  display: flex;
  gap: 6px;
}

.duplicates-modes .category.active {
  border-color: var(--accent, #f05342);
  color: var(--accent, #f05342);
}

.client-card-list-meta {
  display: grid;
  justify-items: end;
  gap: 2px;
  text-align: right;
  white-space: nowrap;
}

.client-card-list-meta em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
}

.client-card-list-meta em.debt {
  color: var(--red);
}

.client-card-empty {
  padding: 18px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.client-docs[hidden],
.client-docs label[hidden],
.client-docs small[hidden],
.js-client-card-panel[hidden] {
  display: none !important;
}

.clients-filter-bar {
  grid-template-columns: minmax(160px, 1fr) minmax(190px, 1.2fr);
}

.clients-limit-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 12px;
}

.clients-limit-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.clients-limit-bar select {
  min-height: 38px;
  min-width: 88px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
}

.clients-limit-bar small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.js-clients-table .table-row,
.clients-table-row {
  grid-template-columns: 1.35fr .8fr 1fr .68fr .52fr .82fr .58fr;
}

.clients-table-row.head button.clients-sort-col {
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 0 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}

.clients-sort-col:hover {
  color: var(--ink);
  background: #eeeae7;
}

.clients-sort-col[data-sort="desc"]::after {
  content: " ↓";
  color: var(--ink);
}

.clients-sort-col[data-sort="asc"]::after {
  content: " ↑";
  color: var(--ink);
}

.js-clients-table .table-row b.status-comrade {
  background: #fff1e6;
  color: #9a4d12;
}

.js-clients-table .table-row b.status-free {
  background: #e8f8ef;
  color: #176b3a;
}

.settings-clients-tools {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

@media (max-width: 760px) {
  .client-edit-grid,
  .client-edit-grid-2,
  .client-debt-grid,
  .client-meta-grid {
    grid-template-columns: 1fr;
  }

  .client-note-form {
    flex-direction: column;
  }

  .client-card-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    top: 72px;
  }

  .client-card-list-item {
    flex-direction: column;
  }

  .client-card-list-meta {
    justify-items: start;
    text-align: left;
  }
}

.client-card-modal-body > .birthday,
.client-card-modal-body > .client-insights,
.client-card-modal-body > .client-action-hints,
.client-card-modal-body > .client-docs,
.client-card-modal-body > .client-admin-tools {
  grid-column: 1 / -1;
}

.client-card-modal-body > h3,
.client-card-modal-body > .membership,
.client-card-modal-body > .client-debt-tools,
.client-card-modal-body > .js-client-history-list,
.client-card-modal-body > .history {
  grid-column: 2;
}

.client-card-modal-body-stack > h3,
.client-card-modal-body-stack > .membership,
.client-card-modal-body-stack > .client-debt-tools,
.client-card-modal-body-stack > .js-client-history-list,
.client-card-modal-body-stack > .history,
.client-card-modal-body-stack > .client-docs,
.client-card-modal-body-stack > .client-card-section {
  grid-column: 1 / -1;
}

.clients-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.clients-layout[hidden] {
  display: none !important;
}

.clients-layout .client-table {
  order: 1;
}

.client-filter-bar {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(190px, 1.2fr) 88px 88px;
  gap: 8px;
  margin: 8px 0 12px;
}

.client-filter-bar select,
.mini-tool {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
}

.client-filter-bar select {
  padding: 0 10px;
}

.mini-tool {
  padding: 0 10px;
}

.visits-layout {
  display: grid;
  grid-template-columns: minmax(720px, 1fr);
  gap: 14px;
}

.visits-main,
.visits-side {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.visits-main {
  padding: 16px;
}

.visits-side {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 14px;
}

.visits-calendar {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.visits-calendar-head {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  gap: 8px;
  align-items: center;
}

.visits-calendar-head strong {
  text-align: center;
  font-size: 18px;
}

.visits-calendar-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.visits-calendar-modes button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
  color: var(--ink);
  font-weight: 700;
}

.visits-calendar-modes button.active {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

.visits-calendar-week,
.visits-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.visits-calendar-week span {
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.visits-calendar-grid button,
.visits-calendar-pad {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
}

.visits-calendar-grid button {
  position: relative;
  display: grid;
  place-items: center;
  gap: 2px;
  color: var(--ink);
}

.visits-calendar-grid.is-week {
  align-items: stretch;
}

.visits-calendar-grid.is-week button {
  min-height: 168px;
  align-content: start;
  justify-items: stretch;
  padding: 8px;
  text-align: left;
}

.visits-calendar-grid button.has-birthday {
  border-color: #f0ab00;
}

.visits-calendar-gift {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 14px;
  line-height: 1;
}

.visits-calendar-grid.is-week .visits-calendar-gift {
  position: static;
  justify-self: end;
}

.visits-week-names {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.visits-week-names b {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}

.visits-calendar-grid button.active {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

.visits-calendar-grid b {
  font-size: 16px;
}

.visits-calendar-grid span {
  color: var(--muted);
  font-size: 11px;
}

.visit-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 130px 140px 140px;
  gap: 10px;
  margin-bottom: 14px;
}

.visit-filters label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.visits-register {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.visits-register-head,
.visits-register-row {
  display: grid;
  grid-template-columns: 150px minmax(220px, 1.25fr) minmax(180px, .95fr) 72px minmax(140px, .85fr);
  gap: 12px;
  align-items: center;
}

.visits-register-day {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: #eeeae7;
  color: #302c2a;
  font-size: 13px;
  font-weight: 850;
  text-transform: capitalize;
}

.visits-register-row {
  width: 100%;
  min-height: 58px;
  margin: 0;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  text-align: left;
  font: inherit;
  font-size: 13px;
  color: inherit;
  cursor: pointer;
}

.visits-register-row.debt {
  background: #fffafa;
}

.visits-register-row.possible-duplicate {
  border-color: #e6b44c;
  box-shadow: inset 3px 0 0 #e6b44c;
}

.shift-report-send-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  white-space: nowrap;
}

.shift-report-send-date input { min-height: 36px; }

.shift-report-rebuild {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid #f5d0cb;
  border-radius: 12px;
  background: #fff2f0;
}

.shift-report-rebuild h3 { margin: 0 0 6px; }
.shift-report-rebuild p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.shift-report-rebuild-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.shift-report-rebuild-actions label { display: grid; gap: 7px; font-size: 13px; font-weight: 750; }
.shift-report-rebuild-actions input { min-height: 40px; }

.visits-register-row:focus-visible {
  outline: 2px solid #f05342;
  outline-offset: -2px;
}

.visits-register-head {
  min-height: 42px;
  padding: 0 14px;
  background: #fff2f0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.visits-register-row:hover {
  background: #fff2f0;
}

.visits-register-row.debt:hover {
  background: #fff5f5;
}

.visits-register-row span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.visits-register-row strong,
.visits-register-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visits-register-row small {
  color: var(--muted);
  font-size: 12px;
}

.visit-pay {
  width: max-content;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 950;
}

.visit-pay.paid {
  background: var(--green-soft);
  color: #23614e;
}

.visit-pay.debt {
  background: #ffe1dd;
  color: #9b2b21;
}

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

.visit-actions button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.visits-empty {
  padding: 18px;
  color: var(--muted);
}

.tickets-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.tickets-main,
.tickets-side,
.ticket-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.tickets-main,
.ticket-box {
  padding: 16px;
}

.tickets-side {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: none;
  gap: 14px;
  align-content: start;
  justify-content: center;
  padding: 18px;
  background: rgba(48, 44, 42, .42);
  overflow: auto;
}

.tickets-side.open {
  display: grid;
}

.tickets-side > * {
  width: min(760px, calc(100vw - 36px));
}

.ticket-modal-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.ticket-modal-top p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-modal-top h2 {
  font-size: 22px;
}

.ticket-modal-top .close {
  cursor: pointer;
  flex-shrink: 0;
}

.ticket-modal-top .close:hover {
  background: #eeeae7;
  color: var(--ink);
}

.tickets-side .ticket-box {
  background: #fff;
}

.ticket-create-box .ticket-rules-card {
  display: none;
}

.tickets-side.mode-create .ticket-freeze-box,
.tickets-side.mode-create .ticket-rules-box,
.tickets-side.mode-create .ticket-history-box,
.tickets-side.mode-create .ticket-upgrade-box,
.tickets-side.mode-freeze .ticket-create-box,
.tickets-side.mode-freeze .ticket-rules-box,
.tickets-side.mode-freeze .ticket-history-box,
.tickets-side.mode-freeze .ticket-upgrade-box,
.tickets-side.mode-history .ticket-freeze-box,
.tickets-side.mode-history .ticket-create-box,
.tickets-side.mode-history .ticket-rules-box,
.tickets-side.mode-history .ticket-upgrade-box,
.tickets-side.mode-upgrade .ticket-freeze-box,
.tickets-side.mode-upgrade .ticket-create-box,
.tickets-side.mode-upgrade .ticket-rules-box,
.tickets-side.mode-upgrade .ticket-history-box {
  display: none;
}

.upgrade-current {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
}

.upgrade-current strong {
  font-size: 16px;
}

.upgrade-current span,
.upgrade-current small {
  color: var(--muted);
}

.upgrade-current.ready {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

.js-manager-approvals-box {
  margin-bottom: 14px;
}

.js-manager-approvals-box .js-ticket-approvals {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.js-manager-approvals-box .approval-card {
  align-items: flex-start;
}

.js-manager-approvals-box .approval-card strong {
  display: block;
  margin-bottom: 2px;
}

.js-manager-approvals-box .approval-card small {
  display: block;
}

.ticket-history-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.ticket-history-tabs button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 850;
}

.ticket-history-tabs button.active {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

.ticket-filters {
  display: grid;
  grid-template-columns: minmax(140px, 1.5fr) minmax(104px, 0.8fr) minmax(104px, 0.95fr) 118px 128px;
  gap: 6px;
  align-items: end;
  margin-bottom: 10px;
}

.ticket-filters label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.ticket-filters input,
.ticket-filters select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 750;
}

.ticket-filters input[type="date"] {
  padding-right: 4px;
}

.tickets-register {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tickets-register-head,
.tickets-register-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1fr) 96px 108px minmax(130px, .8fr) 110px 112px minmax(110px, .8fr) 42px 42px 42px;
  gap: 10px;
  align-items: center;
}

.tickets-register-head {
  min-height: 42px;
  padding: 0 12px;
  background: #fff2f0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.tickets-register-row {
  min-height: 66px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  cursor: pointer;
}

.tickets-register-row.selected {
  outline: 2px solid #f05342;
  outline-offset: -2px;
  background: #fff2f0;
}

.tickets-register.is-searching .tickets-register-row.active {
  background: #ecfdf5;
  box-shadow: inset 4px 0 0 #16a36a;
}

.tickets-register.is-searching .tickets-register-row:is(.pending, .archive, .burned) {
  opacity: .58;
}

.tickets-register.is-searching .tickets-register-row:is(.pending, .archive, .burned).selected {
  opacity: .82;
}

.tickets-register-row.pending {
  background: #fffdf6;
}

.tickets-register-row.burned {
  color: #9b2c2c;
  background: #fff8f8;
}

.tickets-register-row span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.tickets-register-row strong,
.tickets-register-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tickets-register-row small {
  color: var(--muted);
  font-size: 12px;
}

.ticket-price,
.ticket-promo {
  min-width: 0;
}

.ticket-price strong,
.ticket-price small,
.ticket-promo strong,
.ticket-promo small {
  display: block;
}

.ticket-price strong,
.ticket-promo strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-promo.is-applied strong {
  color: #23614e;
}

.tickets-pager {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.tickets-pager + .tickets-register {
  margin-top: 10px;
}

.tickets-register + .tickets-pager {
  margin-top: 10px;
}

.tickets-pager[hidden] {
  display: none;
}

.tickets-pager button {
  min-height: 32px;
  min-width: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
}

.tickets-pager button:disabled {
  opacity: 0.45;
}

.tickets-pager button.active {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

.tickets-pager-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tickets-pager small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

#visits .tickets-pager {
  margin: 10px 0;
}

.client-card-section .js-client-visits-pager {
  margin-top: 12px;
}

.ticket-status {
  width: max-content;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 950;
}

.ticket-status.active {
  background: var(--green-soft);
  color: #23614e;
}

.ticket-status.pending {
  background: #fff4d6;
  color: #8a5a00;
}

.ticket-status.unpaid {
  background: #eeeae7;
  color: #4f4946;
}

.ticket-status.archive,
.ticket-status.burned {
  background: #fde8e8;
  color: #9b2c2c;
}

.client-card-list-item.ticket-row-active {
  border-color: #b7e0d2;
  background: #f3fbf7;
}

.client-card-list-item.ticket-row-pending {
  border-color: #f0d9a0;
  background: #fffdf6;
}

.client-card-list-item.ticket-row-archive,
.client-card-list-item.ticket-row-burned {
  border-color: #f0c7c7;
  background: #fff8f8;
}

.client-card-list-item .ticket-end-date.active {
  color: #23614e;
  font-weight: 700;
}

.client-card-list-item .ticket-end-date.pending {
  color: #8a5a00;
  font-weight: 700;
}

.client-card-list-item .ticket-end-date.archive,
.client-card-list-item .ticket-end-date.burned {
  color: #b42318;
  font-weight: 700;
}

.js-client-profile-card .member-pass.is-active {
  background: linear-gradient(180deg, #eefaf4, #fff) !important;
  border-color: #b7e0d2;
}

.js-client-profile-card .member-pass.is-expired {
  background: linear-gradient(180deg, #fff5f5, #fff) !important;
  border-color: #f0c7c7;
}

.js-client-profile-card .member-pass.is-expired strong,
.js-client-profile-card .member-pass.is-expired span {
  color: #9b2c2c;
}

.js-freeze-usage {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.freeze-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--cyan);
  font-size: 17px;
}

.freeze-btn:hover {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

.freeze-btn.js-pick-freeze-ticket.is-frozen {
  border-color: #f05342;
  background: linear-gradient(145deg, #f5d0cb, #eda89f);
  color: #302c2a;
  box-shadow: 0 0 0 2px rgba(240, 83, 66, .22);
}

.tickets-register-row.is-frozen {
  border-color: #eda89f;
  background: linear-gradient(90deg, #fff2f0 0%, #fff 42%);
}

.tickets-register-row.is-frozen .ticket-status {
  color: #302c2a;
}

.freeze-target {
  display: grid;
  gap: 4px;
  min-height: 54px;
  margin: 8px 0 12px;
  padding: 10px;
  border-radius: 8px;
  background: #fff2f0;
  color: var(--muted);
}

.freeze-target.ready {
  background: var(--cyan-soft);
  color: var(--ink);
}

.freeze-target span {
  color: var(--muted);
  font-size: 12px;
}

.tickets-empty {
  padding: 18px;
  color: var(--muted);
}

.ticket-client-strip {
  display: grid;
  grid-template-columns: 58px 1fr 150px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ticket-client-strip span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.ticket-types {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.ticket-type-card {
  display: grid;
  gap: 8px;
  min-height: 138px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.ticket-type-card.active {
  border-color: var(--cyan);
  background: var(--cyan-soft);
  box-shadow: inset 0 0 0 1px var(--cyan);
}

.ticket-type-card span,
.ticket-type-card small {
  color: var(--muted);
  font-size: 12px;
}

.ticket-type-card strong {
  font-size: 18px;
}

.ticket-type-card b {
  color: var(--cyan);
  font-size: 20px;
}

.ticket-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ticket-row,
.rule-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  border-top: 1px solid var(--line);
}

.ticket-row:first-child,
.rule-line:first-child {
  border-top: 0;
}

.ticket-row span,
.rule-line span {
  color: var(--muted);
}

.ticket-row-active {
  min-height: 62px;
}

.ticket-row-active span {
  display: grid;
  gap: 4px;
}

.ticket-row-active strong {
  color: var(--ink);
}

.ticket-row-active small {
  color: var(--muted);
  font-size: 12px;
}

.ticket-row.muted {
  color: var(--muted);
}

.ticket-row button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.ticket-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ticket-summary span {
  color: var(--muted);
}

.ticket-summary strong {
  color: var(--green);
  font-size: 24px;
}

.discount-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin: 10px 0;
}

.discount-actions button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.discount-actions button.active {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

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

.ticket-choice-grid.months {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ticket-choice-grid button {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-weight: 850;
}

.ticket-choice-grid button span,
.ticket-choice-grid button small {
  display: block;
}

.ticket-choice-grid button small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.ticket-choice-grid button.active {
  border-color: var(--green);
  background: var(--green-soft);
  color: #087a50;
}

.ticket-choice-grid button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.ticket-client-suggestions {
  display: grid;
  gap: 6px;
}

.ticket-client-suggestions[hidden] {
  display: none;
}

.ticket-client-suggestions button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 38px;
  padding: 8px 12px;
  justify-content: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.ticket-client-suggestions button small {
  color: var(--muted);
  font-weight: 650;
}

.ticket-custom-discount[hidden] {
  display: none;
}

.ticket-rules-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
}

.ticket-rules-card div {
  min-width: 0;
}

.ticket-rules-card span,
.ticket-rules-card strong {
  display: block;
}

.ticket-rules-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-rules-card strong {
  margin-top: 4px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-rules-card p {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.ticket-access-card {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.ticket-access-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-access-card input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.ticket-access-result {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
}

.ticket-access-result.ok {
  border-color: #b7ebcd;
  background: #f1fbf5;
}

.ticket-access-result.warn {
  border-color: #ffd56a;
  background: #fff9e8;
}

.ticket-access-result span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.ticket-history {
  display: grid;
  gap: 8px;
}

.ticket-history-head {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
}

.ticket-history-head span,
.ticket-history-note {
  color: var(--muted);
  font-size: 12px;
}

.ticket-history-row {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.ticket-history-row span,
.ticket-history-row small,
.ticket-history-empty {
  color: var(--muted);
  font-size: 12px;
}

.ticket-history-row b {
  font-size: 13px;
}

.ticket-history-empty {
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #faf8f6;
}

.student-proof {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 750;
  color: var(--ink);
}

.student-proof.required {
  border-color: #ffd56a;
  background: #fff9e8;
}

.student-proof input {
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.student-proof span,
.student-proof small {
  display: block;
  line-height: 1.25;
}

.student-proof small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.ticket-docs-block {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 8px;
  border: 1px solid #eeeae7;
  border-radius: 10px;
  background: #faf8f6;
}

.ticket-docs-block[hidden] {
  display: none !important;
}

.ticket-docs-block .ticket-docs-number {
  margin: 0;
  gap: 4px;
  color: #756d69;
  font-size: 11px;
}

.ticket-docs-block .ticket-docs-number input {
  min-height: 34px;
}

.duplicate-item {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.duplicate-item:first-child {
  border-top: 0;
}

.duplicate-item span {
  color: var(--muted);
  font-size: 13px;
}

.add {
  padding: 0 14px;
  color: #fff;
  background: #302c2a;
  border-color: #302c2a;
}

.table-search input {
  width: 100%;
  margin-bottom: 12px;
}

.table-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr .7fr .55fr auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.table-row:not(.head) {
  cursor: pointer;
}

.table-row:not(.head):hover {
  background: #fff2f0;
}

.table-row.head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.table-row b {
  width: max-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fff2f0;
  color: #9e3f34;
}

.table-row em {
  font-style: normal;
  color: var(--muted);
}

.table-row .debt { color: var(--red); }

.debt {
  color: var(--red);
}

.table-row.active {
  background: #fff2f0;
}

.table-row button {
  min-height: 32px;
  padding: 0 10px;
}

.client-top {
  justify-content: flex-start;
  align-items: center;
}

.photo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #302c2a, #756d69);
  color: #fff;
  font-weight: 950;
}

.client-top p { margin-bottom: 0; color: var(--muted); }

.birthday {
  margin: 12px 0 18px;
  padding: 12px;
  border-radius: 8px;
  background: #fff2f0;
  color: #f05342;
  font-weight: 850;
}

.client-insights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.clients-layout .client-card {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr);
  gap: 14px;
  align-items: start;
}

.clients-layout .client-card > .client-top,
.clients-layout .client-card > .birthday,
.clients-layout .client-card > .client-insights,
.clients-layout .client-card > .client-action-hints {
  grid-column: 1;
}

.clients-layout .client-card > h3,
.clients-layout .client-card > .membership,
.clients-layout .client-card > .client-debt-tools,
.clients-layout .client-card > .history {
  grid-column: 2;
}

.client-insights article {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.client-insights span,
.client-insights strong {
  display: block;
}

.client-insights span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-insights strong {
  margin-top: 5px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-action-hints {
  display: grid;
  gap: 8px;
  margin: -4px 0 16px;
}

.client-action-hints article {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
}

.client-action-hints article.ok {
  border-color: #b7ebcd;
  background: #f1fbf5;
}

.client-action-hints article.warn {
  border-color: #ffd56a;
  background: #fff9e8;
}

.client-action-hints article.danger {
  border-color: #ffd0c9;
  background: #fff7f6;
}

.client-action-hints span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.membership {
  display: grid;
  grid-template-columns: 1.2fr .9fr .8fr;
  gap: 8px;
  margin-bottom: 18px;
}

.client-card-pass {
  padding: 10px;
}

.client-card-pass .membership {
  margin: 0;
}

.client-card-section.client-docs {
  margin-top: 0;
}

.membership div {
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.member-pass { background: #fff7d9 !important; }
.debt-card { background: #ffe9e6 !important; }

.membership strong,
.membership span,
.membership small {
  display: block;
}

.membership span { margin-top: 10px; font-weight: 950; }
.membership small { margin-top: 8px; color: var(--muted); }

.js-client-profile-card.client-card-modal {
  width: min(1080px, 100%);
  max-height: min(94vh, 920px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, #fff2f0 0, #fff2f0 92px, #fff 92px);
}

.js-client-profile-card .client-card-modal-head {
  position: static;
  align-items: center;
  padding: 18px 22px 12px;
  border-bottom: 0;
  background: transparent;
}

.js-client-profile-card .client-card-identity {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.js-client-profile-card .client-card-identity-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.js-client-profile-card .client-card-identity h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.js-client-profile-card .client-card-identity p {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
}

.js-client-profile-card .photo {
  width: 64px;
  height: 64px;
  border: 3px solid #fff;
  box-shadow: 0 8px 20px rgba(48, 44, 42, .16);
  font-size: 18px;
}

.client-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eeeae7;
  color: #302c2a;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .01em;
}

.client-status-chip[data-status="comrade"] {
  background: #fff1e6;
  color: #9a4d12;
}

.client-status-chip[data-status="free"] {
  background: #e8f8ef;
  color: #176b3a;
}

.js-client-profile-card .client-card-tabs {
  display: flex;
  gap: 4px;
  margin: 0 22px 4px;
  padding: 4px;
  position: static;
  border-radius: 14px;
  background: #eeeae7;
}

.js-client-profile-card .client-card-tabs button {
  flex: 1;
  min-height: 36px;
}

.js-client-profile-card .client-card-tabs button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.js-client-profile-card .js-client-card-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 22px 20px;
}

.js-client-profile-card .js-client-card-panel > * {
  width: 100%;
  min-width: 0;
}

.js-client-profile-card .client-card-section {
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(48, 44, 42, .04);
}

.js-client-profile-card .client-card-pass {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.js-client-profile-card .membership {
  grid-template-columns: minmax(220px, 1.45fr) repeat(3, minmax(150px, 1fr));
  gap: 10px;
  margin: 0;
}

.js-client-profile-card .membership > * {
  display: grid;
  align-content: start;
  min-width: 0;
  min-height: 108px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: left;
  font: inherit;
  color: inherit;
  overflow: hidden;
}

.js-client-profile-card .member-pass {
  background: linear-gradient(180deg, #fff8e4, #fff) !important;
  border-color: #f3e0a6;
}

.js-client-profile-card .freeze-card {
  background: #fff2f0;
}

.js-client-profile-card .freeze-adjust {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.js-client-profile-card .freeze-adjust input {
  width: 56px;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid #ded8d4;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  background: #fff;
}

.js-client-profile-card .freeze-adjust .mini-tool {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.js-client-profile-card .debt-card {
  background: #fff8f6 !important;
}

.js-client-profile-card .debt-card.has-debt {
  background: #fff1ee !important;
  border-color: #f3b4b4;
}

.js-client-profile-card .debt-card.has-debt span,
.js-client-profile-card .debt-card.has-debt .js-client-membership-debt {
  color: #9b1c1c;
}

.js-client-profile-card .client-kpi-visits {
  cursor: pointer;
  background: linear-gradient(180deg, #f5d0cb, #fff);
  border-color: #eda89f;
}

.js-client-profile-card .client-kpi-visits:hover {
  border-color: #f05342;
  box-shadow: 0 8px 20px rgba(240, 83, 66, .16);
}

.js-client-profile-card .membership strong {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.js-client-profile-card .member-pass strong,
.js-client-profile-card .client-kpi-visits strong {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

.js-client-profile-card .membership span {
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.2;
}

.js-client-profile-card .member-pass span,
.js-client-profile-card .client-kpi-visits span {
  font-size: 13px;
  font-weight: 750;
  color: var(--ink);
}

.js-client-profile-card .membership small {
  margin-top: 6px;
  font-size: 12px;
}

.js-client-profile-card .client-edit-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.js-client-profile-card .client-card-form {
  background: #faf8f6;
}

.js-client-profile-card .client-card-section-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.js-client-profile-card .client-field input,
.js-client-profile-card .client-field select,
.js-client-profile-card .client-field textarea {
  min-height: 42px;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 1px transparent;
}

.js-client-profile-card .client-field input:focus,
.js-client-profile-card .client-field select:focus,
.js-client-profile-card .client-field textarea:focus {
  outline: 0;
  border-color: #f05342;
  box-shadow: 0 0 0 3px rgba(240, 83, 66, .16);
}

.js-client-profile-card .client-meta-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.js-client-profile-card .client-meta-row {
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
}

.js-client-profile-card .client-save-row {
  position: sticky;
  bottom: -4px;
  margin: 4px -4px -4px;
  padding: 12px 4px 4px;
  background: linear-gradient(180deg, transparent, #faf8f6 28%);
}

.js-client-profile-card .client-save-btn {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
}

.js-client-profile-card .client-debt-tools .client-card-section-head em {
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff1ee;
}

.js-client-profile-card .client-card-list-item {
  border-radius: 12px;
  background: #fff;
}

.js-client-profile-card .client-card-empty {
  border-radius: 12px;
  background: #fff2f0;
}

.js-client-profile-card .client-note-form textarea,
.js-client-profile-card .client-note-form .client-save-btn {
  border-radius: 12px;
}

@media (max-width: 900px) {
  .js-client-profile-card .membership,
  .js-client-profile-card .client-edit-grid,
  .js-client-profile-card .client-meta-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .js-client-profile-card .client-card-tabs {
    overflow-x: auto;
  }

  .js-client-profile-card .client-card-tabs button {
    flex: 1 0 auto;
    min-width: 108px;
  }

  .js-client-profile-card .membership,
  .js-client-profile-card .client-meta-grid {
    grid-template-columns: 1fr;
  }
}

.client-docs {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
}

.client-docs label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.client-docs label:has(input[type="checkbox"]) {
  grid-template-columns: 18px 1fr;
  align-items: center;
  color: var(--ink);
}

.client-docs input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}

.client-docs small {
  color: var(--muted);
  font-weight: 800;
}

.client-debt-tools {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid #ffd0c9;
  border-radius: 8px;
  background: #fff7f6;
}

.client-product-tools {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid #ded8d4;
  border-radius: 8px;
  background: #f5fbf9;
}

.client-product-tools h3,
.client-debt-tools h3 {
  margin: 0;
}

.client-product-tools .settings-hint {
  margin: 0;
}

.client-product-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 90px;
  gap: 8px;
}

.client-debt-tools label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.client-debt-tools input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
}

.client-debt-tools > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.history {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.history span { color: var(--muted); }

.empty-board {
  min-height: 360px;
  display: grid;
  place-content: center;
  text-align: center;
}

.empty-board p {
  color: var(--muted);
}

.products-layout,
.finance-layout {
  display: grid;
  grid-template-columns: minmax(620px, 1fr) 320px;
  gap: 14px;
}

.finance-layout {
  grid-template-columns: minmax(0, 1fr);
}

.product-catalog,
.product-side,
.finance-main,
.shift-report {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.product-catalog,
.finance-main,
.shift-report {
  padding: 16px;
}

.product-side {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 14px;
}

.product-register {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.product-register-head,
.product-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.7fr) minmax(110px, .9fr) minmax(70px, .5fr) minmax(90px, .55fr) minmax(128px, .75fr);
  gap: 10px;
  align-items: center;
}

.product-register-head {
  min-height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid #eeeae7;
  background: #faf8f6;
  color: #756d69;
  font-size: 12px;
  font-weight: 850;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.product-row {
  min-height: 54px;
  padding: 8px 14px;
  border-bottom: 1px solid #eeeae7;
  background: #fff;
}

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

.product-row:nth-child(even) {
  background: #faf8f6;
}

.product-row.empty-stock {
  color: var(--muted);
  background: #faf8f6;
}

.product-row:hover {
  background: #fff2f0;
}

.product-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #302c2a;
  font-size: 14px;
}

.product-row span,
.product-row small {
  color: #756d69;
  font-size: 13px;
}

.product-row b {
  color: #302c2a;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.product-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.product-row-actions button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cyan);
  border-color: var(--cyan);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.product-row-actions button:disabled {
  background: #eeeae7;
  border-color: #ded8d4;
  color: var(--muted);
  cursor: default;
}

.product-row-actions .product-edit {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.product-checkout .checkout-head {
  margin-bottom: 10px;
}

.product-checkout .pay-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 12px 0;
}

.product-checkout .pay-tabs button {
  min-height: 39px;
  border: 1px solid #ded8d4;
  border-radius: 10px;
  color: #302c2a;
  background: #faf8f6;
  font-size: 12px;
  font-weight: 850;
}

.product-checkout .pay-tabs button.active {
  border-color: #f05342;
  color: #302c2a;
  background: #fff2f0;
  box-shadow: 0 4px 12px rgba(158, 63, 52, .13);
}

.product-checkout .pay-tabs button[data-pay-method="certificate"] {
  grid-column: 1 / -1;
}

.product-checkout .combo-pay {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.product-checkout .combo-pay > div:last-child {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-checkout .pay-submit {
  margin-top: 4px;
}

.product-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px;
  gap: 10px;
  margin-bottom: 12px;
}

.product-toolbar input,
.product-toolbar select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.product-card {
  display: grid;
  gap: 12px;
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.product-card.empty-stock {
  color: var(--muted);
  background: #faf8f6;
}

.product-card strong {
  font-size: 18px;
}

.product-card span {
  color: var(--muted);
  font-size: 13px;
}

.product-card small {
  color: var(--muted);
  font-size: 12px;
}

.product-card b {
  color: var(--cyan);
  font-size: 22px;
}

.product-card button,
.category {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.product-card button {
  background: var(--cyan);
  color: #fff;
  border-color: var(--cyan);
}

.product-card button:disabled {
  background: #eeeae7;
  border-color: #ded8d4;
  color: var(--muted);
}

.product-extra-actions {
  margin-top: -6px;
}

.product-extra-actions .product-pin {
  width: 100%;
  min-height: 32px;
  background: #fff2f0;
  border-color: var(--line);
  color: var(--muted);
  font-size: 12px;
}

.product-extra-actions .product-edit {
  width: 100%;
  min-height: 32px;
  font-size: 12px;
}

.product-extra-actions .product-pin.active {
  background: #302c2a;
  border-color: #302c2a;
  color: #fff;
}

.side-box,
.finance-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.fund-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  margin: 8px 0;
  padding: 10px;
  border: 1px solid #b7ebcd;
  border-radius: 8px;
  background: #f1fbf5;
}

.fund-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.fund-summary strong {
  color: var(--green);
  white-space: nowrap;
}

.side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.side-title h3 {
  margin: 0;
}

.ghost {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.side-receipt {
  margin-bottom: 12px;
}

.side-receipt .checkout-line {
  padding: 9px 0;
}

.category {
  width: 100%;
  margin-top: 8px;
}

.category span,
.category b {
  pointer-events: none;
}

.category b {
  float: right;
  color: var(--muted);
}

.category.active {
  background: var(--cyan-soft);
  border-color: var(--cyan);
}

.product-empty {
  padding: 18px 14px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .product-register-head {
    display: none;
  }

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

  .product-row strong {
    grid-column: 1;
    white-space: normal;
  }

  .product-row b {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .product-row span,
  .product-row small {
    grid-column: 1;
  }

  .product-row-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .product-row-actions button {
    flex: 1;
  }
}

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

.stock-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stock-summary button,
.stock-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.stock-summary button {
  display: grid;
  min-height: 58px;
  place-items: center;
  padding: 8px;
}

.stock-summary b {
  font-size: 20px;
}

.stock-summary span,
.stock-row small,
.stock-ok span {
  color: var(--muted);
  font-size: 12px;
}

.stock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px;
  text-align: left;
}

.stock-row span {
  min-width: 0;
}

.stock-row b,
.stock-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-row strong {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: #fff7d6;
  color: #8a5b00;
}

.stock-row.is-empty strong {
  background: #ffe7e7;
  color: #b3261e;
}

.stock-ok {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.stock-control-card {
  width: min(720px, 100%);
  max-height: min(88vh, 900px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.stock-control-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.stock-control-summary article {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #faf8f6;
}

.stock-control-summary article.is-empty {
  background: #fff5f5;
  border-color: #f0c7c7;
}

.stock-control-summary article.is-low {
  background: #fffaf0;
  border-color: #edd9a8;
}

.stock-control-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stock-control-summary strong {
  color: #302c2a;
  font-size: 22px;
}

.stock-control-body {
  display: grid;
  gap: 16px;
  margin-top: 14px;
  overflow: auto;
  padding-right: 2px;
}

.stock-control-section {
  display: grid;
  gap: 8px;
}

.stock-control-section h3 {
  margin: 0;
  color: #302c2a;
  font-size: 14px;
}

.stock-control-section h3 small {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 650;
}

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

.stock-control-list .stock-row {
  width: 100%;
  cursor: pointer;
}

.stock-control-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.money-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

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

.money-cards small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.certificate-next-number {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
}

.certificate-next-number span,
.certificate-next-number small {
  color: var(--muted);
  font-size: 12px;
}

.certificate-next-number strong {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.money-cards article {
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.money-cards span,
.pay-stat span,
.report-line span {
  color: var(--muted);
}

.money-cards strong {
  display: block;
  margin-top: 20px;
  font-size: 24px;
}

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

.cash-register-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.cash-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.cash-actions button {
  min-width: 120px;
}

.cash-op-form {
  display: grid;
  gap: 12px;
}

.cash-analytics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.cash-analytics article {
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.cash-analytics span,
.cash-analytics strong {
  display: block;
}

.cash-analytics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.cash-analytics strong {
  margin-top: 8px;
  font-size: 20px;
}

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

.cash-register-head p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.cash-register-head h3 {
  margin: 0;
}

.certificate-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.certificates-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.certificates-main {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 16px;
}

.certificate-modal-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.certificate-filters {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 10px;
  margin-bottom: 12px;
}

.certificate-filters label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.certificates-register {
  display: grid;
  gap: 8px;
}

.certificates-register-head,
.certificates-register-row {
  display: grid;
  grid-template-columns: .8fr .7fr 1.4fr 1fr .7fr;
  gap: 10px;
  align-items: center;
}

.certificates-register-head {
  padding: 0 12px 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.certificates-register-row {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
  text-align: left;
  cursor: pointer;
}

.certificates-register-row.activated {
  background: #eefbf3;
  border-color: #b7e4c7;
}

.certificates-register-row strong,
.certificates-register-row small {
  display: block;
}

.certificates-register-row small {
  color: var(--muted);
  font-size: 12px;
}

.cert-activated-yes {
  color: #166534;
  font-weight: 700;
}

.cert-activated-no {
  color: var(--muted);
}

.certificate-sell {
  display: grid;
  gap: 10px;
}

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

.certificate-row {
  display: grid;
  grid-template-columns: 1.1fr .8fr .8fr .9fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
  text-align: left;
}

.certificate-row small,
.certificate-row span {
  color: var(--muted);
  font-size: 12px;
}

.certificate-history {
  display: grid;
  gap: 6px;
  padding: 0 4px 8px 16px;
  color: var(--muted);
  font-size: 12px;
}

.client-debt-ledger,
.client-debt-history {
  display: grid;
  gap: 6px;
}

.client-debt-line,
.client-debt-pay {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #ffd0c9;
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.client-debt-pay {
  border-color: var(--line);
  background: #faf8f6;
}

.client-debt-line small,
.client-debt-pay small {
  color: var(--muted);
}

.product-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(48, 44, 42, .45);
}

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

.product-modal-card {
  width: min(520px, 100%);
  padding: 18px;
  border-radius: 12px;
  background: #fff;
}

.product-modal-card .settings-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.cash-filters,
.cash-register-headline,
.cash-register-row {
  display: grid;
  grid-template-columns: 1.5fr .8fr .55fr .85fr minmax(148px, 1fr);
  gap: 10px;
  align-items: center;
}

.cash-filters {
  grid-template-columns: 1fr minmax(160px, 200px) 120px 140px 140px 160px;
}

.cash-filters input,
.cash-filters select,
.cash-operation-box select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.cash-register-headline {
  min-height: 34px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.cash-register-row.is-editable {
  cursor: pointer;
}

.cash-register-row.is-editable:hover {
  background: rgba(48, 44, 42, 0.06);
}

.cash-register-row.is-editable:hover b {
  color: var(--accent, #302c2a);
}

.cash-register-row {
  min-height: 58px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.cash-register-row strong,
.cash-register-row small {
  display: block;
}

.cash-register-row small {
  margin-top: 3px;
  color: var(--muted);
}

.cash-register-row b {
  color: var(--green);
}

.cash-register-row.negative b {
  color: var(--red);
}

.cash-register-row button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.cash-item-list {
  display: grid;
  gap: 3px;
  margin: 6px 0 4px;
  padding: 0;
  list-style: none;
}

.cash-item-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #4f4946;
  font-size: 13px;
  line-height: 1.35;
}

.cash-item-list li span {
  min-width: 0;
}

.cash-item-list li .cash-item-sum,
.cash-item-list li b {
  color: #4f4946;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.cash-register-row.has-items .cash-row-title {
  color: #756d69;
  font-size: 12px;
  font-weight: 650;
}

.cash-register-row.has-items .cash-item-list li {
  margin-top: 2px;
  padding: 5px 8px;
  border: 1px solid #eeeae7;
  border-radius: 8px;
  background: #faf8f6;
  color: #302c2a;
  font-weight: 650;
}

.cash-register-row button:disabled {
  opacity: .45;
}

.cash-register-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.cash-register-actions button {
  min-width: 0;
  padding: 0 8px;
  font-size: 12px;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
}

.cashbox-empty {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.cash-operation-box {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.pay-stat,
.report-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  border-top: 1px solid var(--line);
}

.report-line.total {
  margin-top: 4px;
  border-top: 2px solid var(--line);
  font-weight: 950;
}

.report-line b {
  white-space: nowrap;
}

.money-input {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.money-input input {
  width: 100%;
}

.shift-report {
  align-self: start;
}

.report-status {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: var(--green-soft);
  color: #087a50;
  font-weight: 900;
  text-align: center;
}

.report-status.closed {
  background: #eeeae7;
  color: var(--muted);
}

.shift-report-history {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  max-height: min(62vh, 520px);
  overflow: auto;
}

.shift-report-history h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.shift-reports-modal-card {
  width: min(720px, 94vw);
  max-height: 88vh;
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.shift-reports-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 20px 12px;
}

.shift-reports-modal-toolbar .js-shift-reports-count {
  color: var(--muted);
  font-size: 13px;
}

.shift-reports-modal-card .js-shift-report-history {
  padding: 0 20px 20px;
}

.report-modal-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.shift-report-mini {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.shift-report-row { display: grid; gap: 8px; min-width: 0; }
.shift-report-delete,
.client-delete-btn {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #d9a5a0;
  border-radius: 8px;
  background: #fff2f0;
  color: #9b2c2c;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.shift-report-delete { justify-self: end; }
.client-save-row { gap: 10px; flex-wrap: wrap; }
.client-save-row .client-delete-btn { margin-right: auto; }
.tickets-side.open { z-index: 110; }

.shift-report-mini:hover {
  border-color: #9a918d;
  background: #fff;
}

.shift-report-mini span,
.shift-report-mini small {
  color: var(--muted);
  font-size: 12px;
}

.shift-report-mini strong {
  font-size: 18px;
}

.shift-report-mini em {
  margin-top: 3px;
  color: #4f4946;
  font-size: 12px;
  font-style: normal;
}

.shift-report-empty {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #faf8f6;
  font-size: 13px;
}

.staff-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.staff-main-full {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 16px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

#staff {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.staff-main,
.staff-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.staff-main {
  padding: 16px;
}

.staff-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.staff-card {
  padding: 14px;
}

.staff-toolbar {
  display: grid;
  grid-template-columns: 150px minmax(180px, 1fr) 190px minmax(210px, .9fr) 160px 130px 140px;
  gap: 12px;
  margin-bottom: 14px;
}

.staff-toolbar label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.staff-toolbar input,
.staff-toolbar select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.staff-toolbar button {
  align-self: end;
}

.staff-preset-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  align-self: end;
}

.staff-preset-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.staff-preset-actions button.active {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

.staff-month-card {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.staff-month-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.staff-month-head p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.staff-month-head h3 {
  margin: 0;
  font-size: 24px;
}

.staff-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.staff-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.staff-legend i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.staff-legend .morning { background: #11a36a; }
.staff-legend .evening { background: #f05342; }
.staff-legend .penalty { background: #ffcf33; }

.staff-month-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.staff-month-grid {
  --staff-days: 31;
  display: grid;
  grid-template-columns: minmax(132px, 190px) repeat(var(--staff-days), 38px) 74px;
  min-width: max-content;
}

.staff-month-cell {
  min-height: 34px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  place-items: center;
  padding: 3px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.staff-month-cell.head {
  min-height: 38px;
  background: #fff2f0;
  font-weight: 950;
}

.staff-month-cell.weekend {
  background: #ff2d2d;
  color: #fff;
}

.staff-month-cell.name {
  position: sticky;
  left: 0;
  z-index: 2;
  justify-content: start;
  text-align: left;
  font-weight: 850;
}

.staff-month-cell.name.head {
  z-index: 4;
}

.staff-month-cell.total {
  position: sticky;
  right: 0;
  z-index: 2;
  border-right: 0;
  background: #fffef4;
  font-weight: 900;
}

.staff-month-cell.total.head {
  z-index: 4;
  background: #ffcf33;
}

.staff-month-cell.mark {
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.staff-month-cell.mark span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.staff-month-cell.mark small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

.staff-month-cell.mark.morning span { background: #11a36a; }
.staff-month-cell.mark.evening span { background: #f05342; }
.staff-month-cell.mark.custom span { background: #756d69; }
.staff-month-cell.mark.late { background: #fff6dc; }
.staff-month-cell.mark.late small { color: #9a4f00; font-weight: 900; }

.staff-month-cell.selected {
  outline: 2px solid var(--cyan);
  outline-offset: -2px;
}

.timesheet-board {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.timesheet-desktop {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.timesheet-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.timesheet-month-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  background: #fff2f0;
}

.timesheet-month-nav button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

.timesheet-month-nav button:hover {
  background: #fff;
}

.timesheet-month-nav strong {
  min-width: 160px;
  text-align: center;
  color: #e85924;
  font-size: 16px;
}

.timesheet-view-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: #eeeae7;
}

.timesheet-view-toggle button {
  border: 0;
  border-radius: 8px;
  padding: 7px 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.timesheet-view-toggle button.active {
  background: var(--cyan-soft);
  color: #9e3f34;
  box-shadow: inset 0 0 0 1px rgba(240, 83, 66, .35);
}

.timesheet-totals {
  display: flex;
  gap: 8px;
}

.timesheet-totals span {
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  font-weight: 850;
}

.timesheet-brush {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff6b35, #f59e0b);
  color: #fff;
}

.timesheet-brush b {
  margin-right: 4px;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.timesheet-brush button {
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.timesheet-brush .brush-full { background: rgba(231, 127, 114, .18); color: #f05342; }
.timesheet-brush .brush-morning { background: var(--green-soft); color: #0a8f5d; }
.timesheet-brush .brush-evening { background: var(--cyan-soft); color: #9e3f34; }
.timesheet-brush .brush-trainee { background: var(--yellow); color: #7c4a03; }
.timesheet-brush .brush-off { background: rgba(232, 94, 80, .12); color: #b42318; }
.timesheet-brush .brush-modal { background: var(--solid); color: #c2410c; border: 1px solid var(--line); }

.timesheet-brush button.active {
  outline: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,.35);
}

.timesheet-search {
  display: grid;
  gap: 6px;
  max-width: 320px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.timesheet-search input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
}

.timesheet-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  max-height: min(68vh, 720px);
  border: 1px solid var(--line);
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}

.timesheet-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.timesheet-table th,
.timesheet-table td {
  min-width: 40px;
  width: 40px;
  height: 42px;
  border-right: 1px solid #fff2f0;
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding: 4px;
  white-space: nowrap;
}

.timesheet-table th:not(.emp):not(.sum):not(.sum2):not(.total),
.timesheet-table td:not(.emp):not(.sum):not(.sum2):not(.total):not(.timesheet-add-spacer) {
  min-width: 40px;
  width: 40px;
}

.timesheet-table .emp {
  position: sticky;
  left: 0;
  z-index: 4;
  min-width: 220px;
  max-width: 260px;
  text-align: left;
  background: var(--solid);
  padding: 8px 12px;
  border-right: 2px solid var(--line);
  box-shadow: 6px 0 10px rgba(48, 44, 42, .06);
}

.timesheet-emp-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  white-space: normal;
}

.timesheet-table thead .emp {
  z-index: 6;
  background: #fff2f0;
}

.timesheet-table .weekend {
  background: rgba(232, 94, 80, .08);
  color: #b42318;
}

.timesheet-table .today {
  box-shadow: inset 0 0 0 2px #ff7a3d;
}

.timesheet-table .sum,
.timesheet-table .sum2,
.timesheet-table .total {
  display: table-cell;
  justify-content: normal;
  gap: 0;
  background: #fff2f0;
  min-width: 104px;
  width: 104px;
  padding: 4px;
  border-top: 0;
  font-weight: 800;
  vertical-align: middle;
}

.timesheet-table .total {
  background: var(--yellow);
  color: #7c4a03;
}

.timesheet-hours-inline {
  display: block;
  width: 46px;
  min-width: 36px;
  min-height: 28px;
  margin: 2px auto 0;
  padding: 0 4px;
  border: 1px solid var(--cyan);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.timesheet-cell {
  cursor: pointer;
}

.timesheet-cell.editing {
  background: #fff2f0;
  cursor: default;
}

.timesheet-cal-day.editing {
  cursor: default;
}

.timesheet-cal-day .timesheet-hours-inline {
  width: calc(100% - 6px);
  max-width: 64px;
}

.timesheet-cell:hover {
  background: #fff2f0;
}

.shift-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 26px;
  padding: 0 5px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 850;
}

.shift-badge.full_12 { background: rgba(231, 127, 114, .18); color: #f05342; }
.shift-badge.morning_6 { background: var(--green-soft); color: #0a8f5d; }
.shift-badge.evening_6 { background: var(--cyan-soft); color: #9e3f34; }
.shift-badge.trainee { background: var(--yellow); color: #7c4a03; }
.shift-badge.custom { background: rgba(255, 122, 61, .15); color: #c2410c; }
.shift-dot { color: #ded8d4; }

.timesheet-staff-filter {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  color: #302c2a;
}

.timesheet-staff-filter select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--solid);
}

.timesheet-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.timesheet-chips button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  background: #fff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.timesheet-chips button.active {
  border-color: #ff6b35;
  background: #ff6b35;
  color: #fff;
}

.timesheet-mobile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.timesheet-mobile-stats article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  background: #fff;
}

.timesheet-mobile-stats span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.timesheet-mobile-stats b {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.timesheet-cal {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: #fff;
}

.timesheet-cal-head,
.timesheet-cal-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.timesheet-cal-head {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.timesheet-cal-head .we { color: #dc2626; }

.timesheet-cal-days > div:empty {
  min-height: 0;
}

.timesheet-cal-days button,
.timesheet-cal-day {
  min-height: 44px;
  max-height: 56px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--solid);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 2px;
  padding: 3px 2px;
  font: inherit;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
}

.timesheet-cal-day b {
  align-self: center;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
}

.timesheet-cal-names {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: center;
  overflow: hidden;
  max-height: 2.4em;
}

.timesheet-cal-names .shift-badge {
  min-width: 0;
  height: auto;
  padding: 1px 3px;
  font-size: 9px;
  line-height: 1.1;
  font-weight: 800;
  cursor: pointer;
  border-radius: 4px;
}

.timesheet-cal-day > .shift-badge {
  align-self: center;
  min-width: 0;
  height: auto;
  padding: 1px 4px;
  font-size: 9px;
  line-height: 1.1;
}

.timesheet-cal-days button.weekend,
.timesheet-cal-day.weekend { background: rgba(232, 94, 80, .06); }
.timesheet-cal-days button.today,
.timesheet-cal-day.today { border-color: #ff7a3d; box-shadow: inset 0 0 0 1px #ff7a3d; }

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(48, 44, 42, .45);
}

.timesheet-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 81;
  width: min(540px, 100%);
  transform: translateX(-50%);
  border-radius: 20px 20px 0 0;
  padding: 14px 18px 24px;
  background: #fff;
  box-shadow: 0 -8px 30px rgba(0,0,0,.15);
}

.timesheet-sheet.is-dialog {
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100% - 24px));
  border-radius: 16px;
  padding: 20px 22px 22px;
}

.timesheet-sheet.is-dialog .sheet-handle {
  display: none;
}

.timesheet-sheet .js-sheet-duty-save {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
}

.sheet-handle {
  width: 40px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: 2px;
  background: #ded8d4;
}

.sheet-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.sheet-title-row strong { display: block; }
.sheet-title-row small { color: var(--muted); }

.sheet-duty-wrap,
.js-sheet-duty-wrap {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sheet-duty-wrap[hidden],
.js-sheet-duty-wrap[hidden],
.sheet-presets[hidden],
.sheet-custom[hidden],
.js-sheet-custom[hidden],
.js-sheet-duty-save[hidden],
.sheet-clear[hidden] {
  display: none;
}

.sheet-duty-wrap input,
.js-sheet-duty-wrap input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
}

.staff-duty-wrap input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  font: inherit;
}

.staff-users-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.staff-users-note code {
  font-size: 11px;
}

.sheet-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.sheet-btn {
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.sheet-btn small {
  font-size: 10px;
  font-weight: 650;
  opacity: .8;
}

.sheet-btn.full { background: #fff2f0; color: #9e3f34; }
.sheet-btn.morning { background: #dcfce7; color: #166534; }
.sheet-btn.evening { background: #f5d0cb; color: #9e3f34; }
.sheet-btn.trainee { background: #fef9c3; color: #854d0e; }

.sheet-custom {
  display: flex;
  align-items: end;
  gap: 8px;
  margin-bottom: 10px;
}

.sheet-custom label {
  display: grid;
  gap: 4px;
  flex: 1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sheet-custom input {
  flex: 1;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
}

.sheet-clear {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff2f0;
  color: #dc2626;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.app-toast,
.timesheet-toast {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 320;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: min(380px, calc(100vw - 28px));
  padding: 12px 14px;
  border: 1px solid #ded8d4;
  border-radius: 14px;
  background: #fff;
  color: #302c2a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 16px 40px rgba(48, 44, 42, .16);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}

.app-toast[hidden],
.timesheet-toast[hidden] {
  display: none !important;
}

.app-toast.is-show,
.timesheet-toast.is-show {
  opacity: 1;
  transform: translateY(0);
}

.app-toast-mark {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e7f7f2;
  color: #9e3f34;
  font-size: 12px;
  font-weight: 850;
}

.app-toast.is-error .app-toast-mark {
  background: #fdecee;
  color: #c0392b;
}

.app-toast-text {
  min-width: 0;
  padding-top: 2px;
}

.app-toast.is-error,
.timesheet-toast.is-error {
  border-color: #f0c9c9;
  background: #fff8f8;
}

.staff-day-board {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.staff-day-head p,
.staff-day-head h3 {
  margin: 0;
}

.staff-day-head p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.staff-day-head h3 {
  font-size: 20px;
}

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

.staff-day-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 64px minmax(94px, auto);
  gap: 10px;
  align-items: center;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.staff-day-row.active {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

.staff-day-row.late {
  border-color: #ffd56a;
  background: #fff9e8;
}

.staff-day-badge {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 950;
}

.staff-day-person,
.staff-day-fact {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.staff-day-person b,
.staff-day-person small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-day-person small,
.staff-day-fact small,
.staff-day-empty {
  color: var(--muted);
  font-size: 12px;
}

.staff-day-row strong {
  justify-self: end;
  font-size: 12px;
  white-space: nowrap;
}

.staff-day-row.late strong {
  color: #9a4f00;
}

.staff-day-empty {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.late-penalty-helper {
  display: grid;
  gap: 8px;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
}

.late-penalty-helper label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.late-penalty-helper input {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.late-penalty-helper div {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.late-penalty-helper div.warn {
  color: #9a4f00;
  font-weight: 900;
}

.staff-grid-head,
.staff-row {
  display: grid;
  grid-template-columns: 1.3fr .55fr .8fr .8fr .55fr .8fr;
  gap: 10px;
  align-items: center;
}

.staff-grid-head {
  min-height: 38px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.staff-row {
  min-height: 58px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.staff-row.active {
  background: #fff2f0;
}

.staff-row button {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.staff-row .late {
  color: var(--red);
  font-weight: 900;
}

.employee-hero {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.employee-avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #302c2a, #756d69);
  color: #fff;
  font-weight: 950;
}

.employee-hero span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.payroll-lines div,
.shift-log div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 38px;
  border-top: 1px solid var(--line);
}

.payroll-lines span,
.shift-log span {
  color: var(--muted);
}

.payroll-lines .total {
  margin-top: 6px;
  padding-top: 12px;
}

.payroll-lines .total strong {
  color: var(--green);
  font-size: 24px;
}

.adjustment-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}

.settings-main,
.settings-side {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--solid);
  box-shadow: var(--shadow);
}

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

.setting-toggle {
  min-height: 78px;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
}

.setting-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.setting-toggle span {
  display: grid;
  gap: 4px;
}

.setting-toggle strong {
  font-size: 14px;
}

.setting-toggle small,
.settings-side p {
  color: var(--muted);
  line-height: 1.45;
}

.settings-side .confirm {
  width: 100%;
}

.settings-admin {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.settings-admin section {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.settings-admin section[hidden] {
  display: none;
}

.settings-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.settings-tabs button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.settings-tabs button.active {
  border-color: var(--cyan);
  background: var(--cyan-soft);
  color: #302c2a;
}

.settings-fast-goods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.settings-form,
.promotion-setting-row,
.ticket-setting-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.settings-form label,
.promotion-setting-row label,
.ticket-setting-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.settings-form input,
.promotion-setting-row input,
.ticket-setting-row input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
}

.ticket-setting-row {
  grid-template-columns: 1.2fr 120px 90px 100px 90px 90px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.product-settings-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(140px, 0.8fr) minmax(180px, 0.9fr);
  gap: 10px;
  margin-bottom: 12px;
}

.product-settings-toolbar input,
.product-settings-toolbar select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface);
}

.product-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.product-import-label {
  cursor: pointer;
}

.product-settings-head,
.product-setting-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) minmax(120px, 1fr) 90px 90px 90px 90px 135px minmax(150px, auto);
  gap: 10px;
  align-items: center;
}

.product-settings-head {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.product-setting-row {
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.product-setting-row.is-forgotten {
  opacity: .72;
  background: #faf8f6;
}

.product-forget-btn {
  min-height: 34px;
  font-size: 12px;
}

.product-setting-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.product-setting-title small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.product-setting-row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.product-setting-row-actions button {
  min-height: 34px;
  padding: 0 9px;
  white-space: nowrap;
}

.product-setting-stock-control {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.product-setting-stock-control > span {
  display: flex;
  gap: 6px;
  align-items: center;
}

.product-setting-stock-control input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.product-setting-stock-control input[data-product-setting="minQty"] {
  min-height: 30px;
}

.product-stock-control-toggle {
  display: flex !important;
  flex-direction: row;
  gap: 8px !important;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
}

.product-stock-control-toggle input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.product-name-field {
  position: relative;
}

.product-name-field > small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.35;
}

.product-name-suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% - 14px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  max-height: 280px;
  padding: 6px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(48, 44, 42, .18);
}

.product-name-suggestions[hidden] {
  display: none;
}

.product-name-suggestions button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.product-name-suggestions button:hover {
  background: var(--cyan-soft);
}

.product-name-suggestions span,
.product-name-suggestions strong,
.product-name-suggestions small {
  display: block;
}

.product-name-suggestions small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.product-name-suggestions b {
  flex: 0 0 auto;
  color: #756d69;
  font-size: 11px;
}

.product-settings-toolbar-extra {
  margin-top: 8px;
}

.product-setting-row input,
.product-setting-row select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface);
}

.product-setting-profit {
  font-weight: 850;
  color: var(--ink);
}

.js-product-settings-list {
  max-height: 420px;
  overflow: auto;
}

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

.partner-summary article,
.partner-summary > button,
.partner-detail-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.partner-summary > button {
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.partner-summary > button:hover {
  border-color: var(--green);
  background: var(--green-soft);
}

.partner-detail-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
}

.partner-summary span,
.partner-summary b,
.partner-detail-row span,
.partner-detail-row b {
  display: block;
}

.partner-summary span,
.partner-detail-row b {
  color: var(--muted);
  font-size: 12px;
}

.partner-list,
.partner-details {
  display: grid;
  gap: 8px;
}

.client-card-modal .partner-details {
  padding: 14px 18px 18px;
}

.partner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.partner-row span,
.partner-row small {
  display: block;
}

.partner-row small {
  margin-top: 4px;
  color: var(--muted);
}

.partner-row.active {
  border-color: var(--green);
  background: var(--green-soft);
}

.partner-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
}

.partner-tabs button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 38px;
  padding: 0 14px;
  font-weight: 800;
}

.partner-tabs button.active {
  border-color: var(--ink);
  background: #faf8f6;
}

.partner-reward {
  width: 100%;
  margin: 8px 0 12px;
}

/* Referral program — list + detail modal */
.referral-modal-card {
  width: min(720px, calc(100vw - 24px));
  max-height: min(92vh, 920px);
}

.referral-modal-head {
  align-items: flex-start;
}

.referral-modal-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.referral-modal-photo {
  background: linear-gradient(135deg, #302c2a, #9e3f34);
  color: #fff;
  font-weight: 900;
}

.referral-modal-phone {
  color: var(--muted);
  font-size: 13px;
}

.referral-modal-body {
  display: grid;
  gap: 14px;
  overflow: auto;
}

.referral-kpi-ready,
.referral-kpis article.ready {
  border-color: #059669;
  background: #ecfdf5;
}

.referral-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.referral-kpis article {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.referral-kpis span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.referral-kpis b {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  line-height: 1.1;
}

.referral-progress-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff2f0 0%, #fff 100%);
  padding: 14px;
}

.referral-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.referral-progress-head strong {
  font-size: 15px;
}

.referral-progress-head span {
  color: var(--muted);
  font-size: 12px;
}

.referral-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: #eeeae7;
  overflow: hidden;
}

.referral-progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #059669, #34d399);
  transition: width 0.25s ease;
}

.referral-progress-caption {
  margin: 10px 0 0;
  color: #302c2a;
  font-size: 13px;
  line-height: 1.45;
}

.referral-reward-btn {
  margin-top: 12px;
}

.referral-friends-section {
  display: grid;
  gap: 10px;
}

.referral-friends-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.referral-friends-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.referral-friends-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.referral-friend-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.referral-friend-tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.referral-friend-tabs button.active {
  border-color: #302c2a;
  background: #ecfdf5;
  color: #065f46;
}

.referral-friends-grid {
  display: grid;
  gap: 8px;
}

.referral-friend-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "avatar main status"
    "avatar meta meta";
  gap: 4px 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.referral-friend-card:hover {
  border-color: #9a918d;
  box-shadow: 0 4px 14px rgba(48, 44, 42, 0.06);
}

.referral-friend-card.bought {
  border-left: 4px solid #059669;
}

.referral-friend-card.waiting {
  border-left: 4px solid #f59e0b;
}

.referral-friend-avatar {
  grid-area: avatar;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff2f0;
  color: #9e3f34;
  font-size: 12px;
  font-weight: 900;
}

.referral-friend-main {
  grid-area: main;
  min-width: 0;
}

.referral-friend-main strong,
.referral-friend-main small {
  display: block;
}

.referral-friend-main small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.referral-friend-status {
  grid-area: status;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.referral-friend-status.ok {
  background: #ecfdf5;
  color: #047857;
}

.referral-friend-status.pending {
  background: #fff7ed;
  color: #c2410c;
}

.referral-friend-meta {
  grid-area: meta;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.referral-friend-meta b {
  font-size: 14px;
}

.referral-friend-meta small {
  color: var(--muted);
  font-size: 12px;
}

.referral-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.referral-list-row {
  position: relative;
  flex-wrap: wrap;
  align-items: flex-start;
  overflow: hidden;
  padding-bottom: 14px;
}

.referral-list-row-ready {
  border-color: #6ee7b7;
  background: #f0fdf4;
}

.referral-list-main {
  flex: 1 1 180px;
  min-width: 0;
}

.referral-list-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.referral-list-stats em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: #756d69;
  background: #fff2f0;
  border-radius: 999px;
  padding: 2px 8px;
}

.referral-list-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: #eeeae7;
}

.referral-list-progress i {
  display: block;
  height: 100%;
  background: #10b981;
}

.referral-list-sum {
  text-align: right;
  min-width: 92px;
}

.referral-list-sum small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .referral-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .referral-friend-card {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "avatar main"
      "status status"
      "meta meta";
  }
}

.partner-gifts-report {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.partner-gifts-report h3,
.partner-gifts-title {
  margin: 12px 0 0;
  font-size: 14px;
}

.promocode-settings,
.loyalty-progress,
.loyalty-gift-actions {
  display: grid;
  gap: 8px;
}

.promocode-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.promocode-row span,
.promocode-row small,
.promocode-row b {
  display: block;
}

.promocode-row small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 600;
}

.promocode-form {
  margin-top: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.promocode-form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}

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

.ticket-promocode {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 10px;
}

.ticket-promocode .money-input {
  margin-bottom: 0;
}

.ticket-promocode small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.ticket-promocode small.ok {
  color: #087a50;
}

.ticket-promocode small.warn {
  color: #b42318;
}

.loyalty-spend-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

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

.loyalty-gift-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.loyalty-gift-row.order {
  border-color: #e2b15a;
  background: linear-gradient(135deg, #fff8ea, #fff);
}

.friends-order-btn {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  background: #c47b12;
}

.friends-order-btn:hover {
  background: #a8660e;
}

.friends-order-note {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  margin: 0;
  color: #8a5a10;
  font-size: 11px;
  font-weight: 700;
}

.friends-order-note input {
  min-height: 36px;
  width: 100%;
  padding: 0 10px;
  border: 1px solid #ead9b0;
  border-radius: 8px;
  background: #fff;
  color: #302c2a;
  font: inherit;
  font-weight: 650;
}

.friends-order-note-text {
  display: block;
  margin-top: 4px;
  color: #8a5a10;
  font-weight: 700;
}

.friends-orders {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid #ead9b0;
  border-radius: 16px;
  background: #fffaf0;
}

.friends-orders[hidden] {
  display: none;
}

.friends-orders h3 {
  margin: 0;
  color: #302c2a;
  font-size: 15px;
}

.friends-orders .settings-hint {
  margin: 0;
}

.friends-orders .friends-order-row,
.friends-order-mini .friends-order-row {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 8px;
}

.friends-order-mini {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.friends-order-mini > strong {
  color: #8a5a10;
  font-size: 12px;
}

.friends-order-mini .friends-order-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

@media (max-width: 720px) {
  .friends-orders .friends-order-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .friends-orders .friends-order-row > b {
    display: none;
  }
}

.loyalty-gift-row span,
.loyalty-gift-row small,
.loyalty-gift-row b {
  display: block;
}

.loyalty-gift-row small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 600;
}

.loyalty-gift-row label {
  display: grid;
  gap: 2px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

.loyalty-gift-row input[data-gift-qty] {
  width: 64px;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.loyalty-gift-delete {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #f0c2bc;
  border-radius: 8px;
  background: #fff5f4;
  color: #b42318;
  font: inherit;
  font-weight: 750;
  white-space: nowrap;
}

.friends-layout {
  display: grid;
  gap: 14px;
}

.friends-layout .partner-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.loyalty-step {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f6;
  font-size: 12px;
  font-weight: 700;
}

.loyalty-step.ready {
  border-color: #087a50;
  background: var(--green-soft);
  color: #087a50;
}

.loyalty-step.issued {
  color: var(--muted);
}

.promotion-setting-row {
  grid-template-columns: 1.2fr 100px 100px 1fr;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

@media (max-width: 1180px) {
  .topbar,
  .day-layout,
  .service-grid,
  .clients-layout,
  .visits-layout,
  .tickets-layout,
  .ticket-workspace,
  .products-layout,
  .finance-layout,
  .certificates-layout,
  .finance-columns,
  .staff-layout,
  .staff-toolbar,
  .settings-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .desk-actions {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .receipt {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .tickets-register-head,
  .tickets-register-row,
  .cash-filters,
  .cash-register-headline,
  .cash-register-row,
  .certificate-sell,
  .certificate-row,
  .certificates-register-head,
  .certificates-register-row,
  .certificate-filters,
  .visit-filters,
  .visits-register-head,
  .visits-register-row {
    grid-template-columns: 1fr;
  }

  .tickets-register-head,
  .visits-register-head,
  .certificates-register-head {
    display: none;
  }

  .tickets-register-row,
  .visits-register-row {
    align-items: stretch;
  }

  .report-modal-summary {
    grid-template-columns: 1fr;
  }

  .desk-pass-actions-focused,
  .desk-secondary-actions,
  .desk-pass-empty > div,
  .ticket-choice-grid,
  .ticket-choice-grid.months,
  .settings-tabs,
  .settings-fast-goods,
  .partner-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .crm {
    grid-template-columns: 1fr;
    padding: 10px 10px 86px;
  }

  .rail {
    position: static;
    flex-direction: row;
    overflow-x: auto;
  }

  .rail-btn.bottom { margin-top: 0; margin-left: auto; }

  .mobile-quick {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 12px 34px rgba(48, 44, 42, .18);
    backdrop-filter: blur(10px);
  }

  .mobile-quick button {
    min-height: 48px;
    display: grid;
    place-items: center;
    gap: 2px;
    border: 0;
    border-radius: 8px;
    background: #faf8f6;
    color: var(--ink);
    font: inherit;
    font-weight: 900;
  }

  .mobile-quick span {
    font-size: 17px;
    line-height: 1;
  }

  .mobile-quick b {
    font-size: 11px;
  }

  .pass-select,
  .discounts,
  .payment-grid,
  .ticket-types,
  .ticket-rules-card,
  .ticket-filters,
  .visit-filters,
  .ticket-client-strip,
  .client-create-form,
  .product-toolbar,
  .desk-actions,
  .control-strip,
  .attention-board,
  .client-filter-bar,
  .shift-desk-grid,
  .shift-balance,
  .service-grid,
  .product-grid,
  .combo-pay,
  .cash-analytics,
  .money-cards,
  .staff-grid-head,
  .staff-row,
  .staff-day-row,
  .lookup-row,
  .found-profile,
  .visit-options,
  .client-insights,
  .client-debt-tools > div,
  .membership,
  .table-row,
  .debt-client-row,
  .settings-grid,
  .settings-form,
  .promotion-setting-row,
  .ticket-setting-row,
  .product-settings-toolbar,
  .product-settings-head,
  .product-setting-row,
  .promocode-form,
  .ticket-promocode {
    grid-template-columns: 1fr;
  }

  .client-card-modal {
    width: 100%;
    max-height: calc(100vh - 20px);
  }

  .client-card-modal-body {
    grid-template-columns: 1fr;
  }

  .js-clients-table .table-row,
  .clients-table-row {
    grid-template-columns: 1fr 1fr;
  }

  .js-clients-table .table-row.head {
    display: none;
  }

  .js-clients-table .table-row:not(.head) span:nth-child(1) {
    grid-column: 1 / -1;
    font-weight: 800;
  }

  .shift-modal-card {
    width: 100%;
    max-height: calc(100vh - 20px);
    padding: 14px;
  }

  .shift-modal-head,
  .shift-modal-actions {
    align-items: stretch;
  }

  .shift-modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .shift-modal-actions button {
    width: 100%;
  }

  .home-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .today-flow article {
    grid-template-columns: 52px 1fr 30px;
  }

  .today-flow b {
    grid-column: 2;
    text-align: left;
  }

  .flow-delete {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .warning {
    align-items: flex-start;
    flex-direction: column;
  }

  .staff-day-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .staff-day-fact,
  .staff-day-row strong {
    grid-column: 2;
    justify-self: start;
  }

  .clients-layout .client-card,
  .clients-layout .client-card > .client-top,
  .clients-layout .client-card > .birthday,
  .clients-layout .client-card > .client-insights,
  .clients-layout .client-card > .client-action-hints,
  .clients-layout .client-card > h3,
  .clients-layout .client-card > .membership,
  .clients-layout .client-card > .client-debt-tools,
  .clients-layout .client-card > .history {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
}

[data-manager-only][hidden] {
  display: none !important;
}

body.crm-login-page {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  box-sizing: border-box;
  color: #ffffff;
  background: #1e1e1e;
}

.login-page-shell {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  gap: 56px;
  align-items: center;
}

.login-page-brand {
  display: grid;
  justify-items: start;
  min-width: 0;
  text-align: left;
}

.login-page-brand h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: .025em;
  color: #ffffff;
  font-weight: 950;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .24);
}

.login-brand-e { color: #f05342; }
.login-brand-rest { color: #ffffff; }

.login-page-card {
  width: 100%;
  max-width: none;
  justify-self: center;
  padding: 32px;
  gap: 16px;
  border: 1px solid #303438;
  border-radius: 20px;
  color: #302c2a;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .34);
}

.login-card.login-page-card {
  background: #ffffff;
}

.login-page-card input,
.login-page-card select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  box-sizing: border-box;
  border: 1px solid #ded8d4;
  border-radius: 10px;
  color: #302c2a;
  background: #fff;
  font: inherit;
}

.login-page-card input:focus,
.login-page-card select:focus {
  outline: 3px solid rgba(240, 83, 66, .22);
  border-color: #f05342 !important;
}

.login-page-card .confirm {
  min-height: 46px;
  margin-top: 2px;
  border: 1px solid #f05342;
  background: #f05342;
  color: #ffffff;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .08s ease;
}

.login-page-card .confirm:hover:not(:disabled) {
  border-color: #d94333;
  background: #d94333;
}

.login-page-card .confirm:active:not(:disabled) {
  border-color: #c7392b;
  background: #c7392b;
  transform: translateY(1px);
}

.login-page-card .confirm:focus-visible {
  outline: 0;
  border-color: #f05342;
  box-shadow: 0 0 0 3px rgba(240, 83, 66, .22);
}

.login-page-card .confirm:disabled {
  cursor: not-allowed;
  opacity: .52;
}

.login-connection-status {
  color: #756d69;
  text-align: center;
  font-size: 12px;
}

.login-connection-status.is-error {
  color: #b23a36;
}

@media (max-width: 820px) {
  body.crm-login-page {
    padding: 24px;
  }

  .login-page-shell {
    width: min(560px, 100%);
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .login-page-brand {
    justify-items: center;
    text-align: center;
  }

  .login-page-brand h1 {
    font-size: clamp(34px, 9vw, 48px);
  }
}

@media (max-width: 520px) {
  body.crm-login-page {
    place-items: center;
    padding: 20px 16px;
  }

  .login-page-card {
    padding: 20px 18px;
    border-radius: 16px;
  }
}

.acc-quick-expense-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.acc-quick-expense-actions button {
  min-height: 42px;
}

@media (max-width: 620px) {
  .acc-quick-expense-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(48, 44, 42, 0.55);
  backdrop-filter: blur(10px);
}

.login-overlay[hidden] {
  display: none;
}

/* Keep the application shell inaccessible until PHP has confirmed a session. */
body.crm-auth-pending .crm,
body.crm-auth-pending .product-modal-overlay,
body.crm-auth-pending .app-toast,
body.crm-auth-pending .sheet-backdrop,
body.crm-auth-pending .mobile-nav-backdrop {
  visibility: hidden;
  pointer-events: none;
}

.login-card label[hidden],
.js-login-duty-wrap[hidden] {
  display: none !important;
}

.login-card {
  width: min(440px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: visible;
  box-sizing: border-box;
}

.login-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-card h2 {
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}

.login-card label {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: #302c2a;
}

.login-user-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.login-user-label {
  font-size: 13px;
  font-weight: 700;
  color: #302c2a;
}

.login-user-dropdown {
  position: relative;
  min-width: 0;
}

.login-user-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

.login-user-trigger:hover {
  border-color: #c2bab6;
}

.login-user-trigger[aria-expanded="true"] {
  border-color: #e77f72;
  box-shadow: 0 0 0 3px rgba(158, 63, 52, .12);
}

.login-user-trigger-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}

.login-user-trigger-text.is-placeholder {
  color: #756d69;
  font-weight: 650;
}

.login-user-trigger-chevron {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid #756d69;
  border-bottom: 2px solid #756d69;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .15s ease;
}

.login-user-trigger[aria-expanded="true"] .login-user-trigger-chevron {
  transform: rotate(225deg) translateY(-1px);
}

.login-user-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 5;
  display: grid;
  gap: 6px;
  max-height: min(280px, 42vh);
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(48, 44, 42, .16);
}

.login-user-list[hidden] {
  display: none !important;
}

.login-user-option {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #fff;
  color: #302c2a;
  text-align: left;
  cursor: pointer;
}

.login-user-option strong {
  font-size: 13px;
  font-weight: 800;
}

.login-user-option small {
  color: #756d69;
  font-size: 11px;
  font-weight: 650;
}

.login-user-option:hover {
  border-color: #ded8d4;
  background: #f3faf8;
}

.login-user-option.is-active {
  border-color: #e77f72;
  background: #e8f7f3;
  box-shadow: inset 0 0 0 1px rgba(158, 63, 52, .18);
}

.login-user-empty {
  margin: 0;
  padding: 14px 10px;
  color: #756d69;
  font-size: 12px;
  font-weight: 650;
  text-align: center;
}

.login-card input,
.login-card select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-sizing: border-box;
}

.login-error {
  color: #b42318;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.user-form {
  display: grid;
  gap: 10px;
}

.user-form label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #302c2a;
}

.user-form input,
.user-form select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.user-form-actions {
  display: flex;
  gap: 8px;
}

.work-date-row.is-locked .js-work-date-prev,
.work-date-row.is-locked .js-work-date-next,
.work-date-row.is-locked .js-work-date {
  pointer-events: none;
  opacity: 0.55;
}

.staff-side-compact {
  align-content: start;
}

.staff-pay-period {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  font-size: 12px;
  font-weight: 700;
  color: #302c2a;
}

.staff-pay-period select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.timesheet-emp-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.timesheet-emp-remove {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 1px solid #ded8d4;
  border-radius: 6px;
  background: #fff;
  color: #756d69;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.timesheet-emp-remove:hover {
  color: #b42318;
  border-color: #fecdca;
  background: #fff5f5;
}

.timesheet-add-row .timesheet-emp-add {
  cursor: pointer;
  color: #9e3f34;
  background: var(--cyan-soft);
  font-weight: 800;
}

.timesheet-add-row .timesheet-emp-add:hover {
  background: rgba(240, 83, 66, .18);
}

.timesheet-add-row .timesheet-emp-add span {
  display: block;
  padding: 4px 0;
}

.timesheet-add-spacer {
  background: #faf8f6;
  pointer-events: none;
}

.timesheet-add-row .timesheet-add-spacer.sum,
.timesheet-add-row .timesheet-add-spacer.sum2,
.timesheet-add-row .timesheet-add-spacer.total {
  background: #fff2f0;
}

.settings-staff-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.settings-staff-toolbar input {
  flex: 1;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.settings-staff-head,
.settings-staff-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.4fr) 120px 1fr 90px 100px;
  gap: 10px;
  align-items: center;
}

.settings-staff-head {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: #fff2f0;
  font-size: 12px;
  font-weight: 700;
  color: #756d69;
}

.settings-staff-row {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.settings-staff-row:last-child {
  border-radius: 0 0 8px 8px;
}

.settings-staff-row:hover {
  background: #fff2f0;
}

.settings-staff-row.inactive {
  opacity: 0.65;
}

.settings-staff-row strong {
  display: block;
  color: var(--ink);
}

.settings-staff-row span {
  font-size: 13px;
  color: #756d69;
}

.js-timesheet-roster-pick-list,
.timesheet-roster-modal-card .js-timesheet-roster-search {
  margin-top: 12px;
}

.js-timesheet-roster-pick-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.timesheet-roster-pick {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.timesheet-roster-pick:hover {
  border-color: #9a918d;
  background: #fff2f0;
}

.timesheet-roster-pick.duty {
  border-color: #eda89f;
  background: #fff2f0;
}

.timesheet-roster-pick.duty:hover {
  border-color: #f05342;
  background: #fff2f0;
}

.timesheet-roster-pick:disabled {
  opacity: 0.55;
  cursor: default;
}

.staff-user-modal-card {
  width: min(620px, calc(100vw - 32px));
  max-width: 620px;
  box-sizing: border-box;
  overflow: hidden;
}

.staff-user-modal-card .user-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.staff-user-modal-card .user-form label,
.staff-user-modal-card .user-form input,
.staff-user-modal-card .user-form select {
  min-width: 0;
}

.staff-user-modal-card .user-form-actions {
  grid-column: 1 / -1;
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  .staff-user-modal-card .user-form {
    grid-template-columns: 1fr;
  }

  .staff-user-modal-card .user-form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .staff-layout {
    grid-template-columns: 1fr;
  }

  .settings-staff-head,
  .settings-staff-row {
    grid-template-columns: 1fr 1fr;
  }

  .settings-staff-head span:nth-child(n+3),
  .settings-staff-row span:nth-child(n+3) {
    display: none;
  }
}

#accounting,
.js-acc-modal {
  --acc-gap: 12px;
  --acc-pad: 16px;
  --acc-radius: 14px;
  --acc-radius-sm: 10px;
}

.accounting-layout {
  display: grid;
  gap: var(--acc-gap);
  min-height: calc(100vh - 160px);
}

.accounting-lock,
.accounting-app {
  border: 1px solid var(--line);
  border-radius: var(--acc-radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(48, 44, 42, .06);
}

.accounting-lock[hidden],
.accounting-app[hidden] {
  display: none !important;
}

.accounting-lock {
  display: grid;
  place-content: center;
  gap: 8px;
  min-height: 420px;
  text-align: center;
  padding: 32px;
}

.accounting-lock p,
.accounting-head p {
  margin: 0 0 4px;
  color: #9e3f34;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.accounting-lock h2,
.accounting-head h2 {
  margin: 0;
  color: #302c2a;
  letter-spacing: -.02em;
}

.accounting-lock span {
  max-width: 440px;
  color: var(--muted);
  line-height: 1.5;
}

.accounting-app {
  display: grid;
  gap: var(--acc-pad);
  padding: 20px;
}

.accounting-head {
  display: flex;
  justify-content: space-between;
  gap: var(--acc-pad);
  align-items: center;
  flex-wrap: wrap;
}

.accounting-toolbar,
.accounting-years {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.accounting-years button,
.accounting-toolbar > button {
  min-width: 64px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--acc-radius-sm);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.accounting-years button.active {
  background: var(--cyan-soft);
  border-color: #eda89f;
  color: #9e3f34;
}

.accounting-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 4px;
  border: 1px solid #eeeae7;
  border-radius: 12px;
  background: #faf8f6;
}

.accounting-tabs button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #756d69;
  font-weight: 700;
}

.accounting-tabs button.active {
  background: #fff;
  color: #9e3f34;
  box-shadow: 0 2px 8px rgba(48, 44, 42, .08);
}

.accounting-kpis,
.accounting-body {
  display: grid;
  gap: var(--acc-gap);
}

.accounting-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.accounting-kpis.acc-kpis-profit {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.accounting-kpis article,
.acc-card,
.acc-panel,
.acc-exec-card,
.acc-sheet {
  border: 1px solid #eeeae7;
  border-radius: var(--acc-radius);
  background: #fff;
  box-shadow: 0 3px 10px rgba(48, 44, 42, .03);
}

.accounting-kpis article,
.acc-card {
  padding: var(--acc-pad);
}

.accounting-kpis span,
.acc-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.accounting-kpis strong,
.acc-card strong {
  display: block;
  margin-top: 6px;
  color: #302c2a;
  font-size: 20px;
  letter-spacing: -.02em;
}

.accounting-kpis .acc-kpi-action {
  padding: 0;
}

.acc-kpi-action button {
  display: block;
  width: 100%;
  min-height: 100%;
  padding: var(--acc-pad);
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.acc-kpi-action button:hover,
.acc-kpi-action button:focus-visible {
  background: #fff7f5;
  outline: 2px solid #f5d0cb;
  outline-offset: -2px;
}

.accounting-kpis .acc-kpi-action small {
  display: block;
  margin-top: 8px;
  color: #9e3f34;
  font-size: 11px;
  font-weight: 800;
}

.acc-card.fund { background: #fffaf0; }
.acc-card.tax { background: #fff2f0; }
.acc-card.ok { background: #f3fbf6; }
.acc-card.warn { background: #fff7f5; }

.acc-sheet {
  overflow: hidden;
}

.acc-pl-detail-trigger {
  display: block;
  width: 100%;
  min-height: 28px;
  margin: -5px -7px;
  padding: 5px 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  text-align: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.acc-pl-detail-trigger:hover,
.acc-pl-detail-trigger:focus-visible {
  background: #fff2f0;
  color: #302c2a;
  outline: none;
}

.acc-pl-detail {
  display: grid;
  gap: 16px;
}

.acc-modal-pl-detail {
  width: min(760px, calc(100vw - 32px));
}

.acc-pl-payment-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #eeeae7;
  border-radius: 10px;
  background: #faf8f6;
}

.acc-pl-payment-split header {
  min-width: 0;
}

.acc-pl-payment-split header strong,
.acc-pl-payment-split header small {
  display: block;
}

.acc-pl-payment-split header strong {
  color: #302c2a;
  font-size: 13px;
}

.acc-pl-payment-split header small {
  margin-top: 3px;
  color: #756d69;
  font-size: 11px;
}

.acc-pl-payment-split > div {
  min-width: 112px;
  padding-left: 14px;
  border-left: 1px solid #e5ded9;
}

.acc-pl-payment-split > div span,
.acc-pl-payment-split > div b {
  display: block;
  white-space: nowrap;
}

.acc-pl-payment-split > div span {
  color: #756d69;
  font-size: 11px;
  font-weight: 700;
}

.acc-pl-payment-split > div b {
  margin-top: 4px;
  color: #302c2a;
  font-size: 14px;
}

.acc-pl-detail ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #eeeae7;
}

.acc-pl-detail-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #eeeae7;
  color: #4f4946;
  font-size: 14px;
  font-weight: 650;
}

.acc-pl-detail-row span { min-width: 0; overflow-wrap: anywhere; }
.acc-pl-detail-row b { flex: 0 0 auto; color: #302c2a; white-space: nowrap; }
.acc-pl-detail-row.is-deduction b { color: #b24e43; }
.acc-pl-detail-empty { padding: 12px 0; color: var(--muted); }

.acc-pl-detail-group {
  padding: 16px 0 6px;
  color: #9e3f34;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.acc-pl-detail-group:first-child {
  padding-top: 10px;
}

.acc-pl-detail footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #fff2f0;
  color: #302c2a;
}

.acc-pl-detail footer span { font-size: 13px; font-weight: 800; }
.acc-pl-detail footer strong { font-size: 20px; white-space: nowrap; }

.acc-table-wrap {
  overflow-x: auto;
}

.acc-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
}

.acc-table th,
.acc-table td {
  border-bottom: 1px solid #eeeae7;
  padding: 5px 4px;
  text-align: center;
  vertical-align: middle;
}

.acc-table th:first-child,
.acc-table td:first-child {
  width: 158px;
  min-width: 158px;
  padding-left: 12px;
  text-align: left;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
  font-weight: 700;
}

.acc-table th:last-child,
.acc-table td:last-child {
  width: 78px;
  padding-right: 10px;
}

.acc-table thead th {
  background: #faf8f6;
  color: #756d69;
  font-weight: 800;
}

.acc-table thead th:first-child {
  background: #faf8f6;
}

.acc-table .acc-group td {
  background: #fff2f0;
  padding: 6px 12px;
  color: #9e3f34;
  font-weight: 800;
  text-align: left;
}

.acc-table .acc-total {
  font-weight: 800;
  background: #fff2f0;
}
.acc-table .acc-quarter-tax td { padding-top: 2px; padding-bottom: 2px; background: #faf8f6; font-size: 10px; }
.acc-quarter-tax td span { color: #756d69; margin-right: 8px; }
.acc-quarter-tax td strong { white-space: nowrap; }
.system-backup-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; padding: 18px; border: 1px solid #ded8d4; border-radius: 16px; background: #fff; }
.system-backup-panel h3 { margin: 0 0 6px; }
.system-backup-panel p { margin: 0; color: #756d69; }
.system-backup-panel form { flex: 0 0 auto; }
@media (max-width: 620px) { .system-backup-panel { align-items: stretch; flex-direction: column; } .system-backup-panel button { width: 100%; } }

.acc-table thead th.acc-q1 { background: #f5d0cb; color: #4f4946; }
.acc-table thead th.acc-q2 { background: #e3f2ea; color: #3d6b55; }
.acc-table thead th.acc-q3 { background: #f3eadc; color: #6e5a3a; }
.acc-table thead th.acc-q4 { background: #eeeae7; color: #4f4946; }

.acc-table td.acc-q1,
.acc-table td.acc-q1.acc-total,
.acc-table td.acc-q1.acc-live { background: #fff2f0; }

.acc-table td.acc-q2,
.acc-table td.acc-q2.acc-total,
.acc-table td.acc-q2.acc-live { background: #f2f9f5; }

.acc-table td.acc-q3,
.acc-table td.acc-q3.acc-total,
.acc-table td.acc-q3.acc-live { background: #faf6f0; }

.acc-table td.acc-q4,
.acc-table td.acc-q4.acc-total,
.acc-table td.acc-q4.acc-live { background: #faf8f6; }

.acc-table th.acc-q-start,
.acc-table td.acc-q-start {
  border-left: 2px solid rgba(48, 44, 42, 0.16);
}

.acc-table .acc-month-link {
  color: #9e3f34;
  cursor: pointer;
  font-weight: 800;
}

.acc-table .acc-edit {
  cursor: default;
}

.acc-table .acc-edit:hover {
  background: #fff2f0;
}

.acc-table input {
  display: block;
  width: 72px;
  max-width: 100%;
  height: 26px;
  margin: 0 auto;
  border: 1px solid #ded8d4;
  border-radius: 6px;
  background: #fff;
  text-align: center;
  padding: 0 4px;
  font-size: 12px;
}

.acc-table input:focus {
  outline: 0;
  border-color: #eda89f;
  box-shadow: 0 0 0 3px rgba(158, 63, 52, .12);
}

.acc-table .acc-live {
  color: #302c2a;
  font-weight: 700;
}

.acc-live-sum {
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.acc-count {
  display: block;
  width: 100%;
  margin: 2px 0 0;
  border: 0;
  background: none;
  padding: 0;
  color: #756d69;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  text-align: center;
  line-height: 1.2;
}

.acc-count-link,
.acc-link {
  color: #9e3f34;
  cursor: pointer;
  text-decoration: none;
}

.acc-count-link:hover,
.acc-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.acc-link {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 800;
}

.acc-hint {
  margin: 0;
  padding: 12px var(--acc-pad) var(--acc-pad);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.acc-panel .acc-hint {
  padding: 0;
}

.acc-card .acc-meta {
  display: block;
  margin-top: 6px;
}

.acc-mix {
  display: grid;
  gap: var(--acc-gap);
}

.acc-mix-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 12px;
  border: 1px solid #eeeae7;
  border-radius: var(--acc-radius-sm);
  background: #fff2f0;
}

.acc-mix-card strong,
.acc-mix-card b {
  color: #302c2a;
}

.acc-mix-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.acc-mix-card ul {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.acc-fee-box {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #eeeae7;
  border-radius: var(--acc-radius-sm);
  background: #faf8f6;
}

.acc-fee-box span,
.acc-fee-box small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.acc-fee-box strong {
  color: #302c2a;
  font-size: 18px;
}

.acc-subs-btn {
  justify-self: start;
  width: auto;
  min-height: 32px;
  margin: 0;
  padding: 0 12px;
  white-space: nowrap;
}

.acc-goods-cell {
  border: 0;
  background: none;
  padding: 0;
  width: 100%;
  color: #9e3f34;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
}

.acc-goods-cell:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.acc-line-cell {
  border: 0;
  background: none;
  padding: 0;
  width: 100%;
  color: #9e3f34;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
}

.acc-line-cell:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.acc-lines-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.acc-lines-block {
  padding: 12px;
  border: 1px solid #ded8d4;
  border-radius: 12px;
  background: #fff2f0;
}

.acc-lines-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.acc-lines-head-spaced {
  margin-top: var(--acc-gap);
}

.acc-lines-head h3 {
  margin: 0;
}

.acc-lines-head .category,
.acc-lines-head .confirm,
.acc-lines-head .ghost {
  width: auto;
  min-height: 36px;
  margin: 0;
  padding: 0 14px;
  white-space: nowrap;
}

.acc-debt-row.is-closed,
.acc-debt-closed {
  opacity: .62;
}

.acc-row.is-compensated {
  border-color: #b7dcc8;
  background: #f3faf6;
}

.acc-goods {
  display: grid;
  gap: 10px;
}

.acc-goods-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  position: sticky;
  top: 0;
  z-index: 1;
  padding-bottom: 4px;
  background: #fff;
}

.acc-goods-sort {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #ded8d4;
  border-radius: 8px;
  background: #fff;
  color: #4f4946;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.acc-goods-sort.active {
  border-color: #9e3f34;
  background: #fff2f0;
  color: #302c2a;
}

.acc-goods-total {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.acc-goods-block {
  padding: 10px 12px;
  border: 1px solid #eeeae7;
  border-radius: var(--acc-radius-sm);
  background: #fff2f0;
}

.acc-goods-block header {
  display: grid;
  gap: 2px;
}

.acc-goods-block strong {
  color: #302c2a;
  font-size: 13px;
}

.acc-goods-block small {
  color: var(--muted);
  font-size: 12px;
}

.acc-goods-block ul {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.acc-goods-block li {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 56px minmax(84px, .9fr) minmax(84px, .9fr);
  gap: 8px;
  align-items: baseline;
  color: #302c2a;
  font-size: 12px;
}

.acc-goods-block li span:nth-child(n + 2) {
  text-align: right;
  white-space: nowrap;
}

.acc-goods-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-goods-head {
  color: #756d69;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.js-acc-modal .accounting-modal-card.acc-modal-goods {
  width: min(720px, calc(100vw - 32px));
  max-width: 720px;
}

.acc-fields input[readonly] {
  background: #fff2f0;
  color: #302c2a;
  cursor: default;
  border-style: solid;
}

.acc-goods-split {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.acc-month-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 4px;
  border: 1px solid #eeeae7;
  border-radius: 12px;
  background: #faf8f6;
}

.acc-month-bar button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #756d69;
  font-weight: 700;
}

.acc-month-bar button.active {
  background: #fff;
  color: #9e3f34;
  box-shadow: 0 2px 8px rgba(48, 44, 42, .08);
}

.acc-grid-2,
.acc-grid-3 {
  display: grid;
  gap: var(--acc-gap);
}

.acc-grid-2 { grid-template-columns: 1.2fr .8fr; }
.acc-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.acc-panel {
  display: grid;
  align-content: start;
  gap: var(--acc-gap);
  padding: var(--acc-pad);
}

.acc-panel h3 {
  margin: 0;
  color: #302c2a;
}

.acc-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--acc-gap);
}

.acc-fields label,
.acc-form label,
.acc-notes {
  display: grid;
  gap: 6px;
  color: #756d69;
  font-size: 12px;
  font-weight: 700;
}

.acc-fields input,
.acc-form input,
.acc-form select,
.acc-form textarea,
.acc-notes textarea,
.accounting-modal-card input,
.accounting-modal-card select,
.accounting-modal-card textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid #ded8d4;
  border-radius: var(--acc-radius-sm);
  padding: 0 10px;
  background: #fff;
  font-weight: 600;
}

.acc-form textarea,
.acc-notes textarea,
.accounting-modal-card textarea {
  min-height: 80px;
  padding: 8px 10px;
  resize: vertical;
}

.acc-form {
  display: grid;
  gap: var(--acc-gap);
}

.acc-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--acc-gap);
  align-items: end;
}

.acc-form-row > label {
  flex: 1 1 140px;
  min-width: 0;
}

.acc-form-row > label:has(input[name="amount"]),
.acc-form-row > label:has(input[name="hours"]),
.acc-form-row > label:has(input[name="hourlyRate"]),
.acc-form-row > label:has(input[name="bonus"]),
.acc-form-row > label:has(input[name="total"]) {
  flex: 0 1 110px;
}

.acc-form-row-pay > label:first-child {
  flex: 1.6 1 180px;
}

.acc-form-row-staff > label:first-child {
  flex: 1.4 1 160px;
}

.acc-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.acc-form-row > .confirm,
.acc-form-row > .ghost {
  flex: 0 0 auto;
  align-self: end;
}

.acc-panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

#accounting .confirm,
.js-acc-modal .confirm {
  width: auto;
  min-height: 36px;
  margin-top: 0;
  padding: 0 16px;
  border-radius: var(--acc-radius-sm);
  font-weight: 800;
  white-space: nowrap;
}

#accounting .acc-panel-actions .confirm,
#accounting .acc-panel > .confirm {
  min-height: 40px;
  padding: 0 20px;
}

#accounting .category,
.js-acc-modal .category {
  width: auto;
  margin-top: 0;
}

#accounting .accounting-toolbar > .category {
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

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

.acc-row {
  display: grid;
  grid-template-columns: 90px 1fr 110px minmax(80px, 1fr) auto;
  gap: var(--acc-gap);
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #eeeae7;
  border-radius: var(--acc-radius-sm);
  background: #faf8f6;
}

.acc-op-row {
  grid-template-columns: 100px 1fr 130px auto;
}

.acc-op-plus {
  color: #1f7a4c;
}

.acc-op-minus {
  color: #a33b3b;
}

.acc-row-staff {
  grid-template-columns: 1fr 80px 110px auto;
}

.acc-row small,
.acc-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.acc-row button,
.acc-mini {
  min-height: 32px;
  border: 1px solid #eeeae7;
  background: #fff;
  border-radius: 8px;
  padding: 0 10px;
  font-weight: 700;
}

.acc-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.acc-row-actions .ghost,
.acc-row-actions .category,
.acc-row-actions button {
  width: auto;
  min-height: 32px;
  margin: 0;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
}

.acc-expense-cancel {
  min-height: 36px;
}

.acc-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.crm-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #ded8d4;
  border-radius: 10px;
  background: #faf8f6;
  color: #302c2a;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

.crm-check:hover {
  border-color: #e77f72;
  background: #fff2f0;
}

.crm-check input,
.acc-form .crm-check input,
.task-modal-card .crm-check input,
.accounting-modal-card .crm-check input {
  appearance: none;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  padding: 0;
  border: 2px solid #c2bab6;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.crm-check input:checked {
  border-color: #9e3f34;
  background: #9e3f34;
  box-shadow: inset 0 0 0 4px #fff;
}

.acc-exec {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.acc-exec-card {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.acc-exec-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid #eeeae7;
  background: linear-gradient(180deg, #fff2f0, #fff);
}

.acc-exec-head p {
  margin: 0 0 4px;
  color: #756d69;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.acc-exec-head h3 {
  margin: 0;
  color: #302c2a;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.acc-exec-total {
  text-align: right;
}

.acc-exec-total span {
  display: block;
  color: #756d69;
  font-size: 11px;
  font-weight: 700;
}

.acc-exec-total strong,
.acc-exec-total .js-acc-exec-total {
  display: block;
  margin-top: 2px;
  color: #302c2a;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.acc-exec-section {
  display: grid;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #eeeae7;
}

.acc-exec-section:last-child {
  border-bottom: 0;
}

.acc-exec-section h4 {
  margin: 0;
  color: #756d69;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.acc-exec-lines {
  display: grid;
  gap: 6px;
}

.acc-exec-line {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #eeeae7;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  user-select: none;
}

.acc-exec-line:has(input:checked) {
  border-color: #c2bab6;
  background: #eefaf5;
}

.acc-exec-line input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.acc-exec-line span {
  color: #4f4946;
  font-size: 13px;
  font-weight: 700;
}

.acc-exec-line span small {
  margin-left: 6px;
  color: #9a918d;
  font-size: 11px;
  font-weight: 600;
}

.acc-exec-line b {
  color: #302c2a;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.acc-exec-line-paid {
  grid-template-columns: 18px 1fr;
}

.acc-exec-money {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.acc-payout-methods { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.acc-payout-methods .category { min-height: 34px; padding: 0 12px; }
.acc-payout-methods small { color: #756d69; font-size: 11px; font-weight: 700; }

.acc-exec-money label,
.acc-exec-note {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #756d69;
  font-size: 12px;
  font-weight: 700;
}

.acc-exec-money input,
.acc-exec-note input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #ded8d4;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: #302c2a;
  font: inherit;
  font-weight: 700;
}

.acc-exec-comps {
  display: grid;
  gap: 6px;
  max-height: 200px;
  overflow: auto;
}

.acc-comp-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #eeeae7;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.acc-comp-check:has(input:checked) {
  border-color: #b7dcc8;
  background: #f3faf6;
}

.acc-comp-check input {
  margin: 0;
}

.acc-comp-check span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.acc-comp-check strong {
  color: #302c2a;
  font-size: 13px;
}

.acc-comp-check small {
  color: #756d69;
  font-size: 12px;
  font-weight: 600;
}

.acc-comp-check b {
  color: #302c2a;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.acc-exec-foot-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.acc-exec-foot-row .confirm {
  min-height: 38px;
  padding: 0 16px;
  white-space: nowrap;
}

.acc-payouts {
  display: grid;
  gap: 16px;
}

.acc-payout-pool {
  display: grid;
  grid-template-columns: minmax(220px, 420px) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid #ded8d4;
  border-radius: var(--acc-radius-sm);
  background: #fff2f0;
}

.acc-payout-pool label {
  display: grid;
  gap: 6px;
  color: #4f4946;
  font-size: 12px;
  font-weight: 800;
}

.acc-payout-pool input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #c2bab6;
  border-radius: 9px;
  background: #fff;
  color: #302c2a;
  font: inherit;
}

.acc-payout-fund-box {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #f0d4a8;
  border-radius: var(--acc-radius-sm);
  background: #fff8ee;
}

.acc-payout-fund-box.is-active {
  border-color: #e6b35c;
}

.acc-payout-fund-box.is-positive {
  border-color: #a7d9bd;
  background: #f3fbf6;
}

.acc-payout-fund-box.is-positive strong,
.acc-payout-fund-box.is-positive b {
  color: #26704b;
}

.acc-payout-fund-box.is-positive p {
  color: #548069;
}

.acc-payout-fund-box strong {
  display: block;
  color: #8a5a00;
  font-size: 14px;
}

.acc-payout-fund-box p {
  margin: 4px 0 0;
  color: #9a7340;
  font-size: 12px;
  font-weight: 600;
}

.acc-payout-fund-box b {
  color: #8a5a00;
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
}

.acc-payout-select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: #9e3f34;
  font-size: 12px;
  font-weight: 800;
}

.acc-payout-receipt {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #eda89f;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff2f0, #fff);
  box-shadow: 0 12px 30px rgba(48, 44, 42, .09);
}

.acc-payout-receipt > header,
.acc-payout-submit-row,
.acc-payout-receipt-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.acc-payout-receipt header p,
.acc-payout-receipt header h3 { margin: 0; }
.acc-payout-receipt header p { color: #9e3f34; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.acc-payout-receipt header h3 { color: #302c2a; }
.acc-payout-receipt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.acc-payout-receipt-grid article { display: grid; gap: 5px; padding: 13px; border: 1px solid #ded8d4; border-radius: 12px; background: #fff; }
.acc-payout-receipt-grid span { color: #756d69; font-size: 12px; font-weight: 800; }
.acc-payout-receipt-grid strong { color: #302c2a; font-size: 20px; }
.acc-payout-receipt-total { padding-top: 12px; border-top: 1px dashed #c2bab6; color: #302c2a; }
.acc-payout-receipt-total strong { font-size: 26px; }
.acc-payout-submit-row span { color: #756d69; font-size: 12px; }
.acc-payout-compensation-plan { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 11px 13px; border-radius: 10px; background: #fff2f0; color: #756d69; font-size: 12px; font-weight: 700; }
.acc-payout-compensation-plan b { color: #302c2a; white-space: nowrap; }

.acc-payout-history { display: grid; gap: 10px; margin-top: 18px; }
.acc-payout-history > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.acc-payout-history header p, .acc-payout-history header h3 { margin: 0; }
.acc-payout-history header p { color: #756d69; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.acc-payout-history-card { display: grid; gap: 12px; padding: 15px; border: 1px solid #eeeae7; border-radius: 12px; background: #fff; }
.acc-payout-history-summary { display: grid; grid-template-columns: minmax(190px, 1.5fr) repeat(4, minmax(110px, 1fr)) minmax(120px, auto); gap: 12px; align-items: center; }
.acc-payout-history-summary div { display: grid; gap: 3px; }
.acc-payout-history article small { color: #756d69; }
.acc-payout-history-summary > span { display: grid; gap: 3px; color: #756d69; font-size: 11px; }
.acc-payout-history-summary > span b { color: #302c2a; font-size: 13px; white-space: nowrap; }
.acc-payout-history-summary > strong { color: #0c8b65; text-align: right; white-space: nowrap; }
.acc-payout-history-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.acc-payout-history-actions button { min-height: 34px; padding: 0 12px; }
.acc-payout-history-details { border-top: 1px dashed #ded8d4; padding-top: 12px; }
.acc-payout-history-details summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; color: #302c2a; font-size: 13px; font-weight: 800; }
.acc-payout-history-details summary b { display: inline-grid; min-width: 24px; min-height: 24px; place-items: center; border-radius: 999px; background: #f5d0cb; color: #302c2a; }
.acc-payout-person-list { display: grid; gap: 10px; margin-top: 12px; }
.acc-payout-person { display: grid; gap: 10px; padding: 14px; border: 1px solid #ded8d4; border-radius: 10px; background: #faf8f6; }
.acc-payout-person > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #302c2a; }
.acc-payout-person > header b { color: #0c8b65; font-size: 16px; white-space: nowrap; }
.acc-payout-person-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; color: #756d69; font-size: 12px; font-weight: 700; }
.acc-payout-person-meta span { white-space: nowrap; }
.acc-payout-person ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.acc-payout-person li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-top: 6px; border-top: 1px solid #eeeae7; color: #4f4946; font-size: 12px; }
.acc-payout-person li span { min-width: 0; overflow-wrap: anywhere; }
.acc-payout-person li b { color: #302c2a; white-space: nowrap; }
.acc-payout-legacy-note, .acc-payout-payment-note { margin: 0; color: #756d69; font-size: 12px; }

@media (max-width: 820px) {
  .acc-payout-receipt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acc-payout-submit-row { align-items: stretch; flex-direction: column; }
  .acc-payout-history-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acc-payout-history-summary > strong { text-align: left; }
}

@media (max-width: 520px) {
  .acc-payout-receipt-grid { grid-template-columns: 1fr; }
}

.accounting-kpis .acc-meta {
  display: block;
  margin-top: 4px;
  color: #756d69;
  font-size: 11px;
  font-weight: 600;
}

@media (max-width: 1180px) {
  .acc-exec,
  .acc-exec-money {
    grid-template-columns: 1fr;
  }

  .acc-exec-foot-row {
    grid-template-columns: 1fr;
  }

  .acc-exec-foot-row .confirm {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .acc-payout-pool {
    grid-template-columns: 1fr;
  }
}

.acc-compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--acc-gap);
}

.acc-bar-row {
  display: grid;
  grid-template-columns: 70px 1fr 90px;
  gap: var(--acc-gap);
  align-items: center;
}

.acc-bar {
  height: 8px;
  border-radius: 99px;
  background: #eeeae7;
  overflow: hidden;
}

.acc-bar i {
  display: block;
  height: 100%;
  background: #f05342;
}

.acc-empty {
  margin: 0;
  padding: 8px 0;
  color: var(--muted);
}

.accounting-modal-card {
  width: min(640px, calc(100vw - 32px));
  max-width: 640px;
  max-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.js-acc-modal .report-modal-head {
  padding: var(--acc-pad) 20px;
}

.js-acc-modal-body {
  display: grid;
  gap: var(--acc-gap);
  padding: 4px 20px 20px;
  overflow: auto;
}

.acc-cat-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #eeeae7;
}
.acc-category-pl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #4f4946;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.acc-category-pl input { width: 15px; height: 15px; margin: 0; }

.acc-cat-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

@media (max-width: 1180px) {
  .accounting-kpis,
  .acc-grid-2,
  .acc-grid-3,
  .acc-compare {
    grid-template-columns: 1fr;
  }

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

  .acc-form-row > label,
  .acc-form-row > label:has(input[name="amount"]),
  .acc-form-row > label:has(input[name="hours"]),
  .acc-form-row > label:has(input[name="hourlyRate"]),
  .acc-form-row > label:has(input[name="bonus"]),
  .acc-form-row > label:has(input[name="total"]) {
    flex: 1 1 calc(50% - 6px);
  }

  .acc-form-row .acc-form-actions,
  .acc-form-row > .confirm,
  .acc-row button {
    justify-self: start;
  }

  .acc-form-actions {
    width: 100%;
  }

  .acc-form-actions .confirm {
    flex: 1 1 auto;
  }

  .acc-panel-actions {
    justify-content: stretch;
  }

  .acc-panel-actions .confirm {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .accounting-app {
    padding: 14px;
  }

  .accounting-kpis {
    grid-template-columns: 1fr 1fr;
  }

  .accounting-kpis.acc-kpis-profit {
    grid-template-columns: 1fr 1fr;
  }

  .acc-pl-payment-split {
    grid-template-columns: 1fr 1fr;
  }

  .acc-pl-payment-split header {
    grid-column: 1 / -1;
  }

  .acc-pl-payment-split > div {
    min-width: 0;
    padding: 10px 0 0;
    border-top: 1px solid #e5ded9;
    border-left: 0;
  }

  .acc-pl-payment-split > div + div {
    padding-left: 12px;
    border-left: 1px solid #e5ded9;
  }
}

/* Visual refinement: presentation only, no structural or behavioural changes. */
:root {
  --bg: #faf8f6;
  --panel: rgba(255, 255, 255, .94);
  --solid: #ffffff;
  --ink: #302c2a;
  --muted: #756d69;
  --line: #eeeae7;
  --cyan: #9e3f34;
  --cyan-soft: #f5d0cb;
  --green: #16a96f;
  --green-soft: #eaf8f1;
  --shadow: 0 12px 34px rgba(48, 44, 42, .08);
}

body {
  background:
    radial-gradient(circle at 12% -8%, rgba(158, 63, 52, .14), transparent 27rem),
    radial-gradient(circle at 100% 5%, rgba(240, 83, 66, .09), transparent 25rem),
    var(--bg);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.crm {
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 22px;
  padding: 22px;
}

.rail {
  top: 22px;
  min-height: calc(100vh - 44px);
  gap: 9px;
  padding: 14px 11px;
  border: 1px solid rgba(238, 234, 231, .9);
  border-radius: 18px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 16px 38px rgba(48, 44, 42, .1);
  backdrop-filter: blur(18px);
}

.brand {
  width: 46px;
  height: 46px;
  margin-bottom: 5px;
  border-radius: 14px;
  background: linear-gradient(145deg, #f05342, #9e3f34);
  box-shadow: 0 8px 18px rgba(158, 63, 52, .28);
  font-size: 18px;
}

.rail-btn {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  color: #756d69;
  transition: transform .16s ease, background-color .16s ease, color .16s ease;
}

.rail-btn:hover {
  background: #eeeae7;
  color: #9e3f34;
  transform: translateY(-1px);
}

.rail-btn.active {
  background: linear-gradient(135deg, #f5d0cb, #fff2f0);
  color: #9e3f34;
  box-shadow: inset 0 0 0 1px rgba(158, 63, 52, .12);
}

.topbar {
  min-height: 66px;
  height: auto;
  grid-template-columns: max-content 50px minmax(160px, .7fr) minmax(180px, 1fr) max-content max-content max-content 46px 46px;
  gap: 12px;
  margin-bottom: 16px;
}

.topbar h1 {
  padding-left: 4px;
  color: #302c2a;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .08em;
}

.status-pill,
.profile,
.birthday-gift {
  min-height: 46px;
  border-color: rgba(222, 216, 212, .9);
  border-radius: 13px;
  box-shadow: 0 3px 9px rgba(48, 44, 42, .035);
}

.status-pill { background: rgba(255, 255, 255, .82); }
.status-pill.green { border-color: #c9eedb; }
.birthday-gift { background: rgba(255, 255, 255, .86); }
.birthday-gift { width: 50px; min-width: 50px; }
.birthday-gift:hover { background: #fff8ec; border-color: #f7dca6; }

.work-date-row {
  gap: 10px;
  min-height: 54px;
  margin: 0 0 18px;
  padding: 8px 12px;
  border-color: rgba(222, 216, 212, .9);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(48, 44, 42, .035);
}

.work-date-row input[type="date"],
.work-date-row button {
  border-radius: 10px;
}

.work-date-row button:hover { border-color: #eda89f; background: #fff2f0; }
.work-date-row .js-work-date-today { box-shadow: 0 5px 12px rgba(48, 44, 42, .16); }

.home-desk,
.home-checkout {
  border-color: rgba(222, 216, 212, .9);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.home-desk { padding: 22px; }
.home-checkout { padding: 16px; gap: 16px; }

.day-layout { gap: 18px; grid-template-columns: minmax(620px, 1fr) 326px; }
.home-head { gap: 22px; margin-bottom: 20px; }
.home-head p { color: #9a918d; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.home-head h2 { color: #302c2a; font-size: clamp(22px, 2vw, 28px); letter-spacing: -.025em; }

.home-stats { justify-content: flex-end; gap: 7px; }
.home-stats span {
  min-height: 31px;
  padding: 7px 11px;
  border: 1px solid #eeeae7;
  background: #fff2f0;
  color: #4f4946;
  box-shadow: 0 2px 5px rgba(48, 44, 42, .025);
}

.control-strip { gap: 12px; margin-bottom: 16px; }
.control-strip article {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border-radius: 14px;
  border-color: #eeeae7;
  background: linear-gradient(145deg, #fff, #fff2f0);
}
.control-strip article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  bottom: 13px;
  width: 3px;
  border-radius: 99px;
  background: #eda89f;
}
.control-strip strong { color: #302c2a; font-size: 20px; }

.attention-board { gap: 5px; margin: 0; max-height: 84px; overflow: auto; }
.attention-board button {
  min-height: 32px;
  max-height: 36px;
  padding: 4px 8px 4px 11px;
  border-radius: 8px;
  border-color: #eeeae7;
  box-shadow: none;
}
.attention-board button:hover {
  transform: none;
  box-shadow: none;
  border-color: #eda89f;
}
.attention-friends-order {
  min-height: 32px;
  max-height: 36px;
  padding: 4px 8px 4px 11px;
  border-radius: 8px;
  box-shadow: none;
}
.attention-friends-order .attention-client-link { font-size: 10px; }

.service-grid { gap: 16px; }
.client-workbench,
.today-flow,
.checkout-box,
.fast-goods {
  border-color: #eeeae7;
  border-radius: 16px;
  box-shadow: 0 5px 14px rgba(48, 44, 42, .035);
}
.client-workbench,
.today-flow { padding: 18px; }
.mini-title { gap: 13px; margin-bottom: 16px; }
.mini-title > span {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, #302c2a, #302c2a);
  box-shadow: 0 6px 12px rgba(48, 44, 42, .16);
}
.mini-title h3 { color: #302c2a; font-size: 17px; }

.lookup-row { gap: 11px; margin-bottom: 14px; }
.lookup-row label { gap: 7px; color: #756d69; }
.lookup-row input,
.checkout-box input,
.checkout-box select {
  border-color: #ded8d4;
  border-radius: 10px;
}
.lookup-row button {
  border-radius: 11px;
  background: linear-gradient(135deg, #302c2a, #302c2a);
  box-shadow: 0 6px 12px rgba(48, 44, 42, .14);
}
.lookup-row button:hover { filter: brightness(1.08); }

.found-profile {
  padding: 14px;
  border: 1px solid #ccebdd;
  border-radius: 14px;
  background: linear-gradient(135deg, #edf9f3, #f8fcfa);
}
.desk-pass-panel { border-radius: 14px; border-color: #eeeae7; }

.today-flow article {
  margin-bottom: 7px;
  padding: 11px 10px;
  border-radius: 11px;
  transition: background-color .15s ease;
}
.today-flow article:hover { background: #fff2f0; }

.home-checkout { position: sticky; top: 22px; }
.checkout-box { padding: 16px; }
.checkout-head { padding-bottom: 12px; border-bottom: 1px solid #eeeae7; }
.checkout-head strong { color: #14865e; font-size: 21px; }
.pay-tabs { gap: 7px; }
.pay-tabs button { border-radius: 10px; }
.pay-tabs button.active { box-shadow: 0 5px 12px rgba(158, 63, 52, .15); }

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #e77f72 !important;
  box-shadow: 0 0 0 3px rgba(158, 63, 52, .12);
}

@media (max-width: 1180px) {
  .day-layout { grid-template-columns: minmax(0, 1fr); }
  .home-checkout { position: static; }
  .topbar { grid-template-columns: max-content 50px max-content max-content max-content; }
  .topbar .js-cash-total,
  .topbar .js-api-status { display: none; }
}

@media (max-width: 760px) {
  .crm { padding: 12px; gap: 12px; }
  .home-desk { padding: 16px; }
  .home-head { display: grid; gap: 14px; }
  .home-stats { justify-content: flex-start; }
  .control-strip,
  .attention-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Module-level visual system: clients, certificates, cash desk, staff and loyalty. */
.product-modal-overlay,
.client-card-modal-overlay {
  background: rgba(48, 44, 42, .48);
  backdrop-filter: blur(7px);
}

.product-modal-card,
.client-card-modal {
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 20px;
  box-shadow: 0 28px 70px rgba(48, 44, 42, .28);
}

.product-modal-card { padding: 22px; }
.js-acc-modal .product-modal-card.accounting-modal-card {
  display: flex;
  flex-direction: column;
  width: min(640px, calc(100vw - 32px));
  max-height: min(86vh, 760px);
  overflow: hidden;
  padding: 0;
}
.product-modal-card .modal-head,
.client-card-modal-head {
  padding-bottom: 15px;
  border-bottom: 1px solid #eeeae7;
}

.product-modal-card .settings-form,
.certificate-modal-form {
  gap: 13px;
  margin-top: 16px;
}

.product-modal-card label,
.client-card-form label {
  color: #756d69;
  font-size: 12px;
  font-weight: 800;
}

.product-modal-card input,
.product-modal-card select,
.product-modal-card textarea,
.client-card-form input,
.client-card-form select,
.client-card-form textarea {
  min-height: 42px;
  border-color: #ded8d4;
  border-radius: 11px;
}

/* Client database and client profile */
.clients-layout .client-card,
.js-client-profile-card.client-card-modal {
  background: #fff;
  border-color: #eeeae7;
}

.client-card-modal-head {
  background: linear-gradient(135deg, #fff2f0, #fff 65%);
}

.js-client-profile-card .client-card-identity {
  padding: 18px 20px;
  border: 1px solid #f5d0cb;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff2f0, #fff2f0);
}

.js-client-profile-card .client-card-identity h2 { color: #302c2a; letter-spacing: -.025em; }
.js-client-profile-card .client-card-identity p { color: #756d69; }

.client-card-tabs,
.js-client-profile-card .client-card-tabs {
  gap: 6px;
  padding: 6px;
  border: 1px solid #eeeae7;
  border-radius: 14px;
  background: #faf8f6;
}

.client-card-tabs button,
.js-client-profile-card .client-card-tabs button {
  min-height: 36px;
  border-radius: 10px;
  color: #756d69;
  font-weight: 800;
}

.client-card-tabs button.active,
.js-client-profile-card .client-card-tabs button.active {
  background: #fff;
  color: #9e3f34;
  box-shadow: 0 3px 8px rgba(48, 44, 42, .09);
}

.client-card-section,
.js-client-profile-card .client-card-section {
  padding: 16px;
  border: 1px solid #eeeae7;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(48, 44, 42, .025);
}

.client-card-section > h3,
.client-card-section-head h3 { color: #302c2a; }
.client-card-list { gap: 9px; }
.client-card-list-item,
.js-client-profile-card .client-card-list-item {
  padding: 12px;
  border-color: #eeeae7;
  border-radius: 12px;
  background: #faf8f6;
}
.client-card-list-item.compact {
  padding: 6px 10px;
  gap: 8px;
  align-items: center;
  border-radius: 8px;
}
.client-card-list-item.compact strong {
  font-size: 13px;
  line-height: 1.25;
}
.client-card-list-item.compact small {
  margin-top: 2px;
  font-size: 11px;
}
.client-card-list-item.compact .client-card-list-meta {
  gap: 4px;
}
.client-card-list-item.compact .client-card-list-meta b,
.client-card-list-item.compact .client-card-list-meta em {
  font-size: 12px;
}
.client-card-list:has(.compact) {
  gap: 4px;
}
.cash-row-client {
  display: block;
  margin-top: 2px;
  color: #756d69;
  font-size: 12px;
  font-weight: 600;
}
.freeze-list-box {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.freeze-list-box > strong {
  font-size: 12px;
  color: #756d69;
}
.freeze-list {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
}
.freeze-list-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #eeeae7;
  border-radius: 8px;
  background: #faf8f6;
  font-size: 12px;
}
.freeze-list-row.is-active {
  border-color: #e77f72;
  background: #fff2f0;
  box-shadow: inset 3px 0 0 #9e3f34;
}
.freeze-list-row strong {
  display: block;
}
.freeze-list-row small {
  color: #756d69;
}
.freeze-list-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.freeze-delete-btn {
  border: 1px solid #e2b4b4;
  background: #fff7f7;
  color: #a33;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
  line-height: 1.4;
}
.freeze-delete-btn:hover {
  background: #fdecec;
  border-color: #c77;
}
.client-card-list-item:hover { border-color: #eda89f; background: #fff2f0; }
.client-card-empty { border-radius: 12px; background: #faf8f6; }

/* Certificates */
.certificates-main,
.certificate-panel {
  border-color: #eeeae7;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.certificates-main { padding: 20px; }
.certificate-panel { padding: 16px; background: linear-gradient(145deg, #fff, #faf8f6); }
.certificate-next-number {
  border-color: #f5d0cb;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff2f0, #fff2f0);
}
.certificate-next-number strong { color: #9e3f34; letter-spacing: -.04em; }
.certificate-filters { gap: 12px; }
.certificate-filters input,
.certificate-filters select { min-height: 42px; border-radius: 11px; }
.certificates-register { gap: 10px; }
.certificates-register-row,
.certificate-row {
  min-height: 64px;
  padding: 12px 14px;
  border-color: #eeeae7;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 3px 8px rgba(48, 44, 42, .025);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.certificates-register-row:hover,
.certificate-row:hover {
  border-color: #eda89f;
  box-shadow: 0 8px 18px rgba(48, 44, 42, .08);
  transform: translateY(-1px);
}
.certificates-register-row.activated { background: linear-gradient(135deg, #effaf4, #fff); }

/* Cash desk, operation register and shift report */
.finance-main,
.shift-report {
  border-color: #eeeae7;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.finance-main { padding: 20px; }
.shift-report { padding: 18px; }
.money-cards { gap: 14px; }
.money-cards article,
.cash-analytics article {
  position: relative;
  overflow: hidden;
  border-color: #eeeae7;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #fff2f0);
}
.money-cards article::after,
.cash-analytics article::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #f05342, #a5e5d4);
}
.money-cards strong { color: #302c2a; font-variant-numeric: tabular-nums; }
.cash-register-panel {
  padding: 18px;
  border-color: #ded8d4;
  border-radius: 16px;
  background: #fff;
}
.cash-register-head { padding-bottom: 10px; border-bottom: 1px solid #eeeae7; }
.cash-filters { gap: 10px; padding: 10px; border-radius: 14px; background: #faf8f6; }
.cash-filters input,
.cash-filters select,
.cash-operation-box select { border-radius: 10px; }
.cash-register-headline {
  margin: 12px 0 4px;
  padding: 0 13px;
  color: #756d69;
}
.cash-register-row {
  min-height: 56px;
  margin-top: 6px;
  padding: 8px 12px;
  border: 1px solid #eeeae7;
  border-radius: 12px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.cash-register-row:hover,
.cash-register-row.is-editable:hover {
  border-color: #eda89f;
  background: #fff;
  box-shadow: 0 8px 18px rgba(48, 44, 42, .08);
  transform: translateY(-1px);
}
.cash-register-row > span:first-child {
  position: relative;
  padding-left: 12px;
}
.cash-register-row > span:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 4px;
  border-radius: 99px;
  background: #f05342;
}
.cash-register-row > span:first-child strong {
  color: #302c2a;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}
.cash-register-row .cash-row-amount {
  display: block;
  margin-top: 2px;
  color: #109568;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.cash-register-row.negative .cash-row-amount { color: #d7493b; }
.cash-register-row > span:first-child small { max-width: 38ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cash-register-row.is-product > span:first-child small,
.cash-register-row > span:first-child .cash-item-list + small {
  max-width: none;
  white-space: normal;
}
.cash-register-row > span:first-child .cash-item-list {
  margin-top: 7px;
  gap: 4px;
}
.cash-register-row.has-items .cash-row-title {
  color: #756d69;
  font-size: 12px;
  font-weight: 650;
}
.cash-register-row.has-items .cash-item-list li {
  padding: 5px 8px;
  border: 1px solid #eeeae7;
  border-radius: 8px;
  background: #faf8f6;
  color: #302c2a;
  font-weight: 650;
}
.cash-register-row.has-items .cash-item-list .cash-item-sum {
  color: #4f4946;
  font-weight: 500;
}
.cash-register-row > span:first-child .cash-item-list + small {
  max-width: none;
  white-space: normal;
}
.cash-register-row > b { color: #109568; font-size: 16px; font-variant-numeric: tabular-nums; }
.cash-register-row.negative > span:first-child::before { background: #e85e50; }
.cash-register-row.negative > b { color: #d7493b; }
.cash-register-actions button { border-radius: 9px; }
.report-status { border-radius: 13px; }
.report-line { min-height: 46px; }
.report-line.total { padding: 10px 0; color: #302c2a; }
.shift-report-history { gap: 10px; }
.shift-report-mini { padding: 12px; border-radius: 12px; border-color: #eeeae7; }
.shift-report-mini:hover { border-color: #e77f72; box-shadow: 0 6px 14px rgba(48, 44, 42, .08); }

/* Schedule and timesheet */
.staff-main-full,
.staff-main,
.staff-card,
.timesheet-board {
  border-color: #eeeae7;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.staff-main-full { padding: 20px; }
.timesheet-head { gap: 14px; padding-bottom: 14px; border-bottom: 1px solid #eeeae7; }
.timesheet-month-nav { padding: 5px; border: 1px solid #eeeae7; border-radius: 13px; background: #faf8f6; }
.timesheet-month-nav button { border-radius: 9px; }
.timesheet-month-nav strong { color: #302c2a; }
.timesheet-view-toggle,
.timesheet-chips { gap: 6px; }
.timesheet-view-toggle button,
.timesheet-chips button { border-radius: 10px; }
.timesheet-view-toggle button.active,
.timesheet-chips button.active { box-shadow: 0 4px 9px rgba(158, 63, 52, .15); }
.timesheet-totals span {
  padding: 8px 10px;
  border: 1px solid #eeeae7;
  border-radius: 10px;
  background: #fff2f0;
}
.timesheet-scroll { border: 1px solid #eeeae7; border-radius: 14px; }
.timesheet-table { border-collapse: separate; border-spacing: 0; }
.timesheet-table th,
.timesheet-table td { border-color: #eeeae7; }
.timesheet-table thead th { background: #faf8f6; color: #756d69; }
.timesheet-table .emp { background: #faf8f6; }
.timesheet-table .today { background: #fff2f0; }
.timesheet-cell:hover { box-shadow: inset 0 0 0 2px #f05342; }
.timesheet-cal { gap: 7px; padding: 12px; border: 1px solid #eeeae7; border-radius: 15px; background: #faf8f6; }
.timesheet-cal-day { border-radius: 10px; }

/* Partner programme and Friends Energym */
.partner-summary article,
.partner-summary > button,
.partner-detail-row,
.partner-row,
.loyalty-progress,
.loyalty-gift-row,
.loyalty-step {
  border-color: #eeeae7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 9px rgba(48, 44, 42, .025);
}
.partner-summary article,
.partner-summary > button { min-height: 94px; padding: 14px; }
.partner-summary > button:hover,
.partner-row:hover { border-color: #eda89f; background: #fff2f0; }
.partner-tabs { padding: 5px; border-radius: 13px; background: #faf8f6; }
.partner-tabs button { border-radius: 9px; }
.partner-tabs button.active { box-shadow: 0 3px 8px rgba(48, 44, 42, .1); }
.partner-reward { border-radius: 14px; }
.referral-friends-section { padding: 18px; border: 1px solid #eeeae7; border-radius: 18px; background: rgba(255,255,255,.82); }
.referral-friends-head { padding-bottom: 14px; border-bottom: 1px solid #eeeae7; }
.loyalty-progress { padding: 16px; background: linear-gradient(135deg, #fff2f0, #fff); }
.loyalty-gift-list { gap: 10px; }
.loyalty-gift-row { padding: 12px; }
.loyalty-gift-row.ready { border-color: #9ddebf; background: linear-gradient(135deg, #effbf4, #fff); }
.loyalty-step { min-height: 96px; padding: 14px; }
.loyalty-step.ready { box-shadow: 0 7px 15px rgba(22, 169, 111, .1); }

@media (max-width: 960px) {
  .cash-register-headline { display: none; }
  .cash-register-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .cash-register-row > span:nth-child(2),
  .cash-register-row > span:nth-child(3),
  .cash-register-row > span:nth-child(4) { grid-column: 1 / 2; }
  .cash-register-actions { grid-column: 2 / 3; grid-row: 1 / 3; }
}

@media (max-width: 760px) {
  .product-modal-card { padding: 16px; border-radius: 16px; }
  .certificate-modal-form,
  .certificate-filters { grid-template-columns: 1fr; }
  .finance-main,
  .staff-main-full,
  .certificates-main { padding: 14px; }
  .money-cards,
  .cash-analytics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cash-filters { grid-template-columns: 1fr; }
  .cash-register-row { grid-template-columns: 1fr auto; padding: 11px; }
  .cash-register-row > span:nth-child(2),
  .cash-register-row > span:nth-child(3),
  .cash-register-row > span:nth-child(4),
  .cash-register-row > span:nth-child(5) { grid-column: 1 / 2; }
  .cash-register-actions { display: none; }
  .client-card-section,
  .js-client-profile-card .client-card-section { padding: 13px; }
}

@media (max-width: 1180px) {
  .accounting-kpis,
  .acc-grid-2,
  .acc-grid-3,
  .acc-compare,
  .acc-form-row,
  .acc-fields {
    grid-template-columns: 1fr;
  }

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

/* Client card: debt ledger uses explicit data columns and responsive cards. */
.js-client-profile-card .client-debt-tools {
  gap: 16px;
  margin: 0;
  padding: 18px;
  border-color: #efd9d5;
  background: #fffafa;
}

.js-client-profile-card .client-debt-tools > .client-card-section-head {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 16px;
}

.client-debt-intro {
  margin: 5px 0 0;
  color: #756d69;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.js-client-profile-card .client-debt-tools .client-card-section-head em {
  flex: 0 0 auto;
  min-width: 94px;
  padding: 7px 12px;
  text-align: center;
  white-space: nowrap;
}

.js-client-profile-card .client-debt-grid {
  grid-template-columns: minmax(140px, .72fr) minmax(140px, .72fr) minmax(260px, 1.56fr);
  gap: 12px;
}

.js-client-profile-card .client-debt-grid.has-ticket {
  grid-template-columns: minmax(120px, .62fr) minmax(170px, 1fr) minmax(105px, .5fr) minmax(125px, .62fr) minmax(220px, 1.3fr);
}

.js-client-profile-card .client-debt-ticket-field[hidden] {
  display: none;
}

.js-client-profile-card .client-debt-tools > .client-debt-actions {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
}

.js-client-profile-card .client-debt-actions button,
.js-client-profile-card .client-debt-line-actions button {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.15;
  white-space: nowrap;
}

.js-client-profile-card .client-debt-action-primary {
  border-color: #9e3f34;
  background: #9e3f34;
  color: #fff;
}

.js-client-profile-card .client-debt-action-primary:hover {
  border-color: #302c2a;
  background: #302c2a;
}

.js-client-profile-card .client-debt-action-secondary,
.js-client-profile-card .client-debt-action-checkout {
  border: 1px solid #ded8d4;
  background: #fff;
  color: #302c2a;
}

.js-client-profile-card .client-debt-action-secondary:hover,
.js-client-profile-card .client-debt-action-checkout:hover {
  border-color: #e77f72;
  background: #fff2f0;
}

.js-client-profile-card .client-debt-tools > .client-debt-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding-top: 16px;
  border-top: 1px solid #eadfdd;
}

.js-client-profile-card .client-debt-group h4 {
  margin: 0;
  color: #302c2a;
  font-size: 13px;
  font-weight: 900;
}

.js-client-profile-card .client-debt-ledger,
.js-client-profile-card .client-debt-history {
  gap: 8px;
  min-width: 0;
}

.js-client-profile-card .client-debt-columns-head,
.js-client-profile-card .client-debt-line-main {
  display: grid;
  grid-template-columns: minmax(132px, .9fr) minmax(150px, 1fr) minmax(220px, 1.8fr) minmax(88px, .62fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.js-client-profile-card .client-debt-columns-head {
  padding: 0 14px 2px;
  color: #756d69;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.js-client-profile-card .client-debt-columns-head span:last-child {
  text-align: right;
}

.js-client-profile-card .client-debt-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #ead9d6;
  border-radius: 12px;
  background: #fff;
}

.js-client-profile-card .client-debt-line-main {
  padding: 13px 14px;
}

.js-client-profile-card .client-debt-line-main time,
.js-client-profile-card .client-debt-line-main strong {
  white-space: nowrap;
}

.js-client-profile-card .client-debt-line-main time {
  color: #4f4946;
  font-size: 12px;
  font-weight: 750;
}

.js-client-profile-card .client-debt-line-main b {
  min-width: 0;
  color: #302c2a;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.js-client-profile-card .client-debt-line-comment {
  min-width: 0;
  color: #756d69;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.js-client-profile-card .client-debt-line-main strong {
  justify-self: end;
  color: #a33232;
  font-size: 14px;
}

.js-client-profile-card .client-debt-line-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px 10px 14px;
  border-top: 1px solid #f0e5e3;
  background: #fff8f7;
}

.js-client-profile-card .client-debt-line-footer > small {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: #756d69;
  font-size: 12px;
  font-weight: 750;
}

.js-client-profile-card .client-debt-line-footer > small span:last-child {
  color: #a33232;
  font-weight: 900;
}

.js-client-profile-card .client-debt-line-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.js-client-profile-card .client-debt-line-actions button {
  min-height: 36px;
  border: 1px solid #ded8d4;
  background: #fff;
  color: #302c2a;
}

.js-client-profile-card .client-debt-line-actions button:hover {
  border-color: #e77f72;
  background: #fff2f0;
}

.js-client-profile-card .client-debt-line-actions button.danger {
  border-color: #efc5c0;
  background: #fff;
  color: #a33232;
}

.js-client-profile-card .client-debt-line-actions button.danger:hover {
  border-color: #d99087;
  background: #fff1ef;
}

.js-client-profile-card .client-debt-pay {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(240px, 1.2fr);
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border-color: #ded8d4;
  border-radius: 12px;
  background: #fff2f0;
}

.js-client-profile-card .client-debt-pay-main {
  display: grid;
  gap: 4px;
}

.js-client-profile-card .client-debt-pay-main b {
  color: #176b3a;
  font-size: 14px;
}

.js-client-profile-card .client-debt-pay-main small,
.js-client-profile-card .client-debt-pay-comment {
  line-height: 1.4;
  overflow-wrap: break-word;
}

.js-client-profile-card .client-debt-ledger > small,
.js-client-profile-card .client-debt-history > small {
  display: block;
  padding: 13px 14px;
  border: 1px dashed #ded8d4;
  border-radius: 12px;
  background: #faf8f6;
  color: #756d69;
  font-weight: 700;
}

@media (max-width: 900px) {
  .js-client-profile-card .client-debt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .js-client-profile-card .client-debt-grid.has-ticket {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .js-client-profile-card .client-debt-grid .client-field:last-child {
    grid-column: 1 / -1;
  }

  .js-client-profile-card .client-debt-columns-head {
    display: none;
  }

  .js-client-profile-card .client-debt-line-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
  }

  .js-client-profile-card .client-debt-line-main > * {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    align-items: start;
    justify-self: stretch;
    white-space: normal;
  }

  .js-client-profile-card .client-debt-line-main > *::before {
    content: attr(data-label);
    color: #756d69;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .035em;
    text-transform: uppercase;
  }

  .js-client-profile-card .client-debt-line-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .js-client-profile-card .client-debt-line-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .js-client-profile-card .client-debt-tools {
    gap: 14px;
    padding: 14px;
  }

  .js-client-profile-card .client-debt-tools > .client-card-section-head {
    align-items: flex-start;
  }

  .client-debt-intro {
    max-width: 24ch;
    font-size: 12px;
  }

  .js-client-profile-card .client-debt-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .js-client-profile-card .client-debt-grid.has-ticket {
    grid-template-columns: minmax(0, 1fr);
  }

  .js-client-profile-card .client-debt-grid .client-field:last-child {
    grid-column: auto;
  }

  .js-client-profile-card .client-debt-tools > .client-debt-actions,
  .js-client-profile-card .client-debt-line-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .js-client-profile-card .client-debt-actions button,
  .js-client-profile-card .client-debt-line-actions button {
    width: 100%;
  }

  .js-client-profile-card .client-debt-columns-head {
    display: none;
  }

  .js-client-profile-card .client-debt-line-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
  }

  .js-client-profile-card .client-debt-line-main > * {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    justify-self: stretch;
    white-space: normal;
  }

  .js-client-profile-card .client-debt-line-main > * {
    grid-column: auto;
  }

  .js-client-profile-card .client-debt-line-main > *::before {
    content: attr(data-label);
    color: #756d69;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .035em;
    text-transform: uppercase;
  }

  .js-client-profile-card .client-debt-line-main strong {
    color: #a33232;
  }

  .js-client-profile-card .client-debt-line-footer {
    padding: 12px 14px 14px;
  }

  .js-client-profile-card .client-debt-line-footer > small {
    display: grid;
    gap: 5px;
  }

  .js-client-profile-card .client-debt-pay {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
}

/* Certificates - dedicated layout pass. */
#certificates .certificates-layout { max-width: 1440px; margin: 0 auto; }
#certificates .certificates-main { padding: 24px; }
#certificates .section-head {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eeeae7;
}
#certificates .section-head > div { min-width: 0; }
#certificates .section-head p {
  margin: 0 0 4px;
  color: #9e3f34;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
#certificates .section-head h2 { color: #302c2a; font-size: 27px; letter-spacing: -.03em; }
#certificates .section-head .add,
#certificates .section-head .category {
  width: auto;
  min-height: 42px;
  margin: 0;
  padding: 0 16px;
  border-radius: 11px;
}
#certificates .section-head .add {
  border-color: #302c2a;
  background: linear-gradient(135deg, #302c2a, #302c2a);
  color: #fff;
  box-shadow: 0 7px 15px rgba(48, 44, 42, .16);
}
#certificates .section-head .category { color: #756d69; background: #faf8f6; }
#certificates .section-head .category:hover { border-color: #eda89f; background: #fff2f0; }
#certificates .certificate-filters {
  grid-template-columns: minmax(260px, 1fr) minmax(190px, .42fr);
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid #eeeae7;
  border-radius: 14px;
  background: #faf8f6;
}
#certificates .certificate-filters label { gap: 7px; color: #756d69; font-weight: 800; }
#certificates .certificate-filters input,
#certificates .certificate-filters select { min-height: 44px; background: #fff; }
#certificates .certificates-register {
  gap: 0;
  overflow: hidden;
  border: 1px solid #eeeae7;
  border-radius: 15px;
  background: #fff;
}
#certificates .certificates-register-head,
#certificates .certificates-register-row {
  grid-template-columns: minmax(90px, .55fr) minmax(110px, .7fr) minmax(230px, 1.65fr) minmax(185px, 1fr) minmax(110px, .65fr);
}
#certificates .certificates-register-head {
  min-height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid #eeeae7;
  background: #faf8f6;
  color: #756d69;
}
#certificates .js-certificates-list {
  display: grid;
  width: 100%;
  max-height: calc(100vh - 350px);
  overflow: auto;
}
#certificates .certificates-register-row {
  width: 100%;
  min-height: 68px;
  margin: 0;
  padding: 11px 16px;
  border: 0;
  border-bottom: 1px solid #eeeae7;
  border-radius: 0;
  box-shadow: none;
  color: #302c2a;
}
#certificates .certificates-register-row:last-child { border-bottom: 0; }
#certificates .certificates-register-row:nth-child(even) { background: #faf8f6; }
#certificates .certificates-register-row.activated { background: #f1faf5; }
#certificates .certificates-register-row:hover {
  position: relative;
  z-index: 1;
  border-color: #eda89f;
  background: #fff2f0;
  box-shadow: inset 4px 0 0 #f05342;
  transform: none;
}
#certificates .certificates-register-row > * { min-width: 0; }
#certificates .certificates-register-row > span:first-child strong { color: #302c2a; font-size: 16px; font-variant-numeric: tabular-nums; }
#certificates .certificates-register-row > span:nth-child(2) { color: #756d69; font-variant-numeric: tabular-nums; }
#certificates .certificates-register-row > span:nth-child(3) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#certificates .certificates-register-row > span:nth-child(4) strong { color: #302c2a; font-size: 15px; }
#certificates .certificates-register-row > small {
  justify-self: start;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eeeae7;
  color: #756d69;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}
#certificates .certificates-register-row.activated > small { background: #dff3e8; color: #157347; }
.js-certificate-modal .product-modal-card { width: min(600px, 100%); padding: 0; overflow: hidden; }
.js-certificate-modal .report-modal-head {
  margin: 0;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #eeeae7;
  background: linear-gradient(135deg, #fff2f0, #fff 70%);
}
.js-certificate-modal .report-modal-head p { color: #9e3f34; font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.js-certificate-modal .report-modal-head h2 { color: #302c2a; font-size: 25px; letter-spacing: -.025em; }
.js-certificate-modal .report-modal-head .close { border-radius: 10px; }
.js-certificate-modal .certificate-modal-form {
  grid-template-columns: minmax(0, 1.25fr) minmax(180px, .75fr);
  align-items: stretch;
  margin: 0;
  padding: 22px 24px 14px;
}
.js-certificate-modal .certificate-modal-form > label { display: grid; align-content: center; gap: 8px; }
.js-certificate-modal .certificate-modal-form input {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border-radius: 12px;
  color: #302c2a;
  font-size: 20px;
  font-weight: 900;
}
.js-certificate-modal .certificate-next-number { align-content: center; min-height: 108px; padding: 15px 17px; border-radius: 14px; }
.js-certificate-modal .certificate-next-number strong { font-size: 32px; }
.js-certificate-modal .settings-hint {
  margin: 0 24px;
  padding: 12px 14px;
  border-radius: 11px;
  background: #faf8f6;
  color: #756d69;
  line-height: 1.45;
}
.js-certificate-modal .shift-modal-actions { padding: 16px 24px 24px; }
.js-certificate-modal .shift-modal-actions .confirm {
  min-height: 50px;
  margin: 0;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(16, 169, 111, .2);
}
@media (max-width: 760px) {
  #certificates .certificates-main { padding: 14px; }
  #certificates .section-head { grid-template-columns: 1fr 1fr; }
  #certificates .section-head > div { grid-column: 1 / -1; }
  #certificates .section-head .add,
  #certificates .section-head .category { width: 100%; }
  #certificates .certificate-filters { grid-template-columns: 1fr; padding: 10px; }
  #certificates .certificates-register { border: 0; background: transparent; overflow: visible; }
  #certificates .certificates-register-head { display: none; }
  #certificates .js-certificates-list { gap: 9px; max-height: none; overflow: visible; }
  #certificates .certificates-register-row {
    grid-template-columns: auto 1fr;
    gap: 7px 12px;
    padding: 13px;
    border: 1px solid #eeeae7;
    border-radius: 13px;
  }
  #certificates .certificates-register-row > span:nth-child(3),
  #certificates .certificates-register-row > span:nth-child(4) { grid-column: 1 / -1; }
  #certificates .certificates-register-row > small { grid-column: 2; grid-row: 1; justify-self: end; }
  .js-certificate-modal .certificate-modal-form { grid-template-columns: 1fr; padding: 18px 18px 12px; }
  .js-certificate-modal .report-modal-head { padding: 18px; }
  .js-certificate-modal .settings-hint { margin: 0 18px; }
  .js-certificate-modal .shift-modal-actions { padding: 14px 18px 18px; }
}

/* Partner programme — dedicated layout pass. */
#partners .friends-layout {
  max-width: 1440px;
  margin: 0 auto;
}
#partners .client-table {
  padding: 24px;
  border-color: #eeeae7;
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
}
#partners .section-head {
  margin-bottom: 5px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eeeae7;
}
#partners .section-head p {
  margin-bottom: 5px;
  color: #15956f;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
#partners .section-head h2 {
  color: #302c2a;
  font-size: 28px;
  letter-spacing: -.035em;
}
#partners > .friends-layout .settings-hint,
#partners .client-table > .settings-hint {
  max-width: 820px;
  margin: 12px 0 18px;
  color: #756d69;
  font-size: 13px;
  line-height: 1.55;
}
#partners .partner-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
#partners .partner-summary article {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 104px;
  overflow: hidden;
  padding: 15px 16px;
  border-color: #eeeae7;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #faf8f6);
  box-shadow: 0 4px 12px rgba(48, 44, 42, .04);
}
#partners .partner-summary article::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -29px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(158, 63, 52, .08);
}
#partners .partner-summary article:nth-child(2)::after { background: rgba(158, 63, 52, .09); }
#partners .partner-summary article:nth-child(3)::after { background: rgba(240, 83, 66, .08); }
#partners .partner-summary article:nth-child(4)::after { background: rgba(245, 158, 11, .11); }
#partners .partner-summary span {
  color: #756d69;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .055em;
  text-transform: uppercase;
}
#partners .partner-summary b {
  position: relative;
  z-index: 1;
  margin-top: 13px;
  color: #302c2a;
  font-size: 25px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
#partners .partner-summary .referral-kpi-ready {
  border-color: #8dddbd;
  background: linear-gradient(145deg, #eaf9f1, #fff);
}
#partners .partner-list {
  gap: 9px;
  max-height: calc(100vh - 440px);
  padding: 2px;
}
#partners .referral-list-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(190px, .8fr) minmax(130px, .45fr);
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 13px 16px 16px;
  border-color: #eeeae7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 9px rgba(48, 44, 42, .03);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
#partners .referral-list-row:hover {
  border-color: #8fd9c4;
  background: linear-gradient(90deg, #f3fcf8, #fff 70%);
  box-shadow: 0 8px 18px rgba(21, 84, 66, .08);
  transform: translateY(-1px);
}
#partners .referral-list-row.active {
  border-color: #36b68d;
  background: linear-gradient(90deg, #eaf9f2, #fff 70%);
  box-shadow: 0 7px 16px rgba(19, 122, 89, .09);
}
#partners .referral-list-main { min-width: 0; }
#partners .referral-list-main strong {
  display: block;
  overflow: hidden;
  color: #302c2a;
  font-size: 15px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#partners .referral-list-main small { color: #756d69; font-variant-numeric: tabular-nums; }
#partners .referral-list-stats { justify-content: flex-start; }
#partners .referral-list-stats em {
  padding: 5px 9px;
  border: 1px solid #eeeae7;
  background: #faf8f6;
  color: #756d69;
}
#partners .referral-list-sum {
  min-width: 125px;
  color: #302c2a;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
#partners .referral-list-sum small {
  color: #756d69;
  font-size: 11px;
  font-weight: 800;
}
#partners .referral-list-progress { height: 4px; background: #eeeae7; }
#partners .referral-list-progress i { border-radius: 0 99px 99px 0; background: linear-gradient(90deg, #129b74, #35c9a0); }
#partners .referral-list-row-ready {
  border-color: #76d6b2;
  background: linear-gradient(90deg, #eafaf2, #fff 75%);
}

.js-partner-detail-modal { backdrop-filter: blur(8px); }
.js-partner-detail-modal .referral-modal-card {
  width: min(780px, calc(100vw - 28px));
  overflow: hidden;
  border-radius: 22px;
}
.js-partner-detail-modal .referral-modal-head {
  padding: 20px 22px;
  border-bottom: 1px solid #eeeae7;
  background: linear-gradient(135deg, #ebfaf4, #f8fcfb 55%, #fff);
}
.js-partner-detail-modal .referral-modal-photo {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(145deg, #9e3f34, #f05342);
  box-shadow: 0 8px 17px rgba(158, 63, 52, .22);
}
.js-partner-detail-modal .referral-modal-head-text > p:first-child {
  color: #168769;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.js-partner-detail-modal .referral-modal-head-text h2 { color: #302c2a; letter-spacing: -.025em; }
.js-partner-detail-modal .referral-modal-head-actions .ghost,
.js-partner-detail-modal .referral-modal-head-actions .close { border-radius: 10px; }
.js-partner-detail-modal .referral-modal-body { gap: 16px; padding: 18px; background: #faf8f6; }
.js-partner-detail-modal .referral-kpis { gap: 10px; }
.js-partner-detail-modal .referral-kpis article {
  min-height: 92px;
  padding: 13px;
  border-color: #ded8d4;
  border-radius: 13px;
  background: #fff;
}
.js-partner-detail-modal .referral-kpis b { color: #302c2a; font-variant-numeric: tabular-nums; }
.js-partner-detail-modal .referral-progress-card {
  padding: 16px;
  border-color: #ded8d4;
  border-radius: 15px;
  background: #fff;
}
.js-partner-detail-modal .referral-progress-bar { height: 11px; background: #eeeae7; }
.js-partner-detail-modal .referral-progress-bar i { background: linear-gradient(90deg, #10936e, #3dd3a8); }
.js-partner-detail-modal .referral-friends-section {
  padding: 16px;
  border-color: #ded8d4;
  border-radius: 15px;
  background: #fff;
}
.js-partner-detail-modal .referral-friend-tabs button { min-height: 34px; border-radius: 999px; }
.js-partner-detail-modal .referral-friend-card {
  padding: 13px;
  border-color: #eeeae7;
  border-radius: 13px;
  background: #faf8f6;
}
.js-partner-detail-modal .referral-friend-card:hover { border-color: #8fd7c2; background: #f3fbf8; }

@media (max-width: 900px) {
  #partners .partner-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #partners .referral-list-row { grid-template-columns: minmax(0, 1fr) auto; }
  #partners .referral-list-stats { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 600px) {
  #partners .client-table { padding: 14px; }
  #partners .partner-summary { gap: 8px; }
  #partners .partner-summary article { min-height: 88px; padding: 12px; }
  #partners .partner-summary b { font-size: 21px; }
  #partners .partner-list { max-height: none; }
  #partners .referral-list-row { grid-template-columns: 1fr auto; padding: 12px 12px 15px; }
  #partners .referral-list-main strong { white-space: normal; }
  .js-partner-detail-modal .referral-modal-head { display: grid; gap: 12px; }
  .js-partner-detail-modal .referral-modal-head-actions { justify-content: space-between; }
  .js-partner-detail-modal .referral-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Friends ENERGYM history finishing touches */
.js-friends-gift-modal .client-card-modal-head,
.js-friends-issued-modal .client-card-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.js-friends-issued-modal .partner-detail-row > span,
.js-friends-gift-modal .partner-detail-row > span {
  min-width: 0;
  color: #302c2a;
  font-weight: 780;
}

.js-friends-issued-modal .partner-detail-row small,
.js-friends-gift-modal .partner-detail-row small {
  display: block;
  margin-top: 5px;
  color: #756d69;
  font-size: 11px;
  font-weight: 650;
}

.js-friends-issued-modal .partner-detail-row > b,
.js-friends-gift-modal .partner-detail-row > b {
  color: #756d69;
  font-size: 11px;
  white-space: nowrap;
}

/* Home checkout, fast goods and new-client form */
#day .home-checkout {
  align-self: start;
  padding: 12px;
  border: 1px solid #ded8d4;
  border-radius: 20px;
  background: rgba(255, 242, 240, .94);
  box-shadow: 0 18px 42px rgba(48, 44, 42, .09);
}

#day .home-checkout .checkout-box {
  padding: 17px;
  border: 1px solid #ded8d4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(48, 44, 42, .045);
}

#day .checkout-head {
  margin-bottom: 10px;
  padding-bottom: 13px;
  border-bottom: 1px solid #eeeae7;
}

#day .checkout-head span {
  color: #756d69;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

#day .checkout-head strong {
  color: #09825d;
  font-size: 24px;
  letter-spacing: -.04em;
}

#day .checkout-line {
  min-height: 48px;
  padding: 10px 2px;
}

#day .checkout-line span { min-width: 0; color: #302c2a; font-weight: 750; }
#day .checkout-line span strong { display: block; line-height: 1.25; }
#day .checkout-line span small.checkout-client {
  color: #756d69;
  font-size: 12px;
  font-weight: 650;
}
#day .checkout-line b { color: #302c2a; white-space: nowrap; }

#day .checkout-line button {
  flex: 0 0 30px;
  border-color: #f1d5d1;
  border-radius: 9px;
  background: #fff7f6;
}

#day .pay-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 13px 0;
}

#day .pay-tabs button {
  min-height: 39px;
  border: 1px solid #ded8d4;
  border-radius: 10px;
  color: #302c2a;
  background: #faf8f6;
  font-size: 12px;
  font-weight: 850;
}

#day .pay-tabs button.active {
  border-color: #f05342;
  color: #302c2a;
  background: #fff2f0;
  box-shadow: 0 4px 12px rgba(158, 63, 52, .13);
}

#day .pay-tabs button[data-pay-method="certificate"] { grid-column: 1 / -1; }

#day .combo-pay {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 10px 0 13px;
  padding: 12px;
  border-color: #ded8d4;
  border-radius: 12px;
  background: #faf8f6;
}

#day .combo-pay label,
#day .combo-pay > div {
  gap: 5px;
  color: #756d69;
  font-size: 9px;
  letter-spacing: .045em;
}

#day .combo-pay > div:last-child {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 11px;
  border-radius: 9px;
  background: #eeeae7;
}

#day .combo-pay input {
  height: 38px;
  border-radius: 9px;
  font-size: 14px;
}

#day .cash-received,
#day .certificate-pay,
#day .certificate-remainder {
  border-color: #ded8d4;
  border-radius: 12px;
  background: #faf8f6;
}

#day .pay-submit {
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #18ad7c, #0d9168);
  box-shadow: 0 9px 20px rgba(13, 145, 104, .2);
  font-weight: 900;
  transition: transform .16s ease, box-shadow .16s ease;
}

#day .pay-submit:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(13, 145, 104, .25); }

#day .fast-goods {
  gap: 10px;
  padding: 16px;
  border: 1px solid #ded8d4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(48, 44, 42, .045);
}

#day .fast-goods h3 {
  margin: 0 0 2px;
  color: #302c2a;
  font-size: 15px;
  letter-spacing: -.015em;
}

#day .fast-goods input {
  min-height: 42px;
  border-color: #ded8d4;
  border-radius: 11px;
  background: #faf8f6;
}

#day .js-fast-goods-list { gap: 7px; }

#day .fast-goods button,
#day .js-fast-goods-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 9px 12px;
  border: 1px solid #ded8d4;
  border-radius: 11px;
  color: #302c2a;
  text-align: left;
  background: #fff;
  box-shadow: 0 3px 9px rgba(48, 44, 42, .035);
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

#day .fast-goods button:hover,
#day .js-fast-goods-list button:hover {
  border-color: #e77f72;
  background: #fff2f0;
  transform: translateY(-1px);
}

#day .fast-goods button > span:first-child,
#day .js-fast-goods-list button > span:first-child {
  min-width: 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

#day .fast-goods button > span:last-child,
#day .js-fast-goods-list button > span:last-child {
  padding: 6px 8px;
  border-radius: 8px;
  color: #302c2a;
  background: #fff2f0;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.js-client-create-modal {
  padding: 24px;
  background: rgba(48, 44, 42, .55);
  backdrop-filter: blur(10px);
}

.js-client-create-modal .client-create-modal {
  width: min(820px, calc(100vw - 34px));
  max-height: min(90vh, 820px);
  gap: 17px;
  overflow: auto;
  padding: 0 22px 22px;
  border: 1px solid #ded8d4;
  border-radius: 22px;
  background: #faf8f6;
  box-shadow: 0 30px 80px rgba(48, 44, 42, .28);
}

.js-client-create-modal .client-create-head {
  top: 0;
  z-index: 3;
  align-items: center;
  margin: 0 -22px;
  padding: 20px 22px 17px;
  border-bottom: 1px solid #ded8d4;
  background: linear-gradient(135deg, #fff2f0 0%, #fff 72%);
}

.js-client-create-modal .client-create-head span {
  margin-bottom: 5px;
  color: #9e3f34;
  font-size: 10px;
  letter-spacing: .11em;
}

.js-client-create-modal .client-create-head strong {
  display: block;
  color: #302c2a;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.js-client-create-modal .close {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #ded8d4;
  border-radius: 50%;
  background: #fff;
}

.js-client-create-modal .client-create-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 12px;
  padding: 17px;
  border: 1px solid #ded8d4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(48, 44, 42, .045);
}

.js-client-create-modal .client-create-form label {
  gap: 7px;
  color: #756d69;
  font-size: 11px;
  font-weight: 800;
}

.js-client-create-modal .client-create-form input,
.js-client-create-modal .client-create-form select {
  min-height: 43px;
  border-color: #ded8d4;
  border-radius: 10px;
  background: #faf8f6;
  font-size: 13px;
}

.js-client-create-modal .free-visit-note {
  margin: 0;
  padding: 13px 15px;
  border: 1px solid #efdda7;
  border-radius: 13px;
  color: #765a13;
  background: #fff9e9;
}

.js-client-create-modal .free-visit-note strong,
.js-client-create-modal .free-visit-note small { display: block; }
.js-client-create-modal .free-visit-note small { margin-top: 4px; color: #8a7b57; }

.js-client-create-modal .client-create-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding-top: 2px;
}

.js-client-create-modal .client-create-actions > button,
.js-client-create-modal .client-create-desk-actions button {
  min-height: 45px;
  border-radius: 11px;
  padding: 0 15px;
  font-size: 12px;
  font-weight: 850;
}

.js-client-create-modal .client-save-btn {
  border: 1px solid #77c7aa;
  color: #087454;
  background: #edf9f3;
}

.js-client-create-modal .client-create-desk-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.js-client-create-modal .client-create-desk-actions .primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #302c2a, #302c2a);
  box-shadow: 0 6px 14px rgba(48, 44, 42, .15);
}

.js-client-create-modal .client-create-actions > .danger {
  grid-column: 1 / -1;
  min-height: 39px;
  border: 1px solid #efcfcc;
  color: #a44a43;
  background: #fff6f5;
}

@media (max-width: 760px) {
  .js-client-create-modal .client-create-form { grid-template-columns: 1fr; }
  .js-client-create-modal .client-create-actions { grid-template-columns: 1fr; }
  .js-client-create-modal .client-create-desk-actions { grid-template-columns: 1fr; }
  .js-client-create-modal .client-create-actions > .danger { grid-column: auto; }
}

/* Main-page operational status ribbon */
#day .home-head {
  display: grid;
  grid-template-columns: 1fr;
  align-items: flex-start;
  gap: 14px;
}

#day .home-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  padding: 9px;
  border: 1px solid #ded8d4;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff2f0, #fff);
  box-shadow: 0 7px 20px rgba(48, 44, 42, .055);
}

#day .home-stats span {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #eeeae7;
  border-radius: 10px;
  color: #4f4946;
  background: #fff;
  box-shadow: none;
  font-size: 11px;
  font-weight: 820;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

#day .home-stats span[hidden] { display: none !important; }

#day .home-stats span::before {
  position: absolute;
  left: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e77f72;
  box-shadow: 0 0 0 4px rgba(231, 127, 114, .13);
  display: none;
  content: "";
}

#day .home-stats span:nth-child(4),
#day .home-stats span:nth-child(5) {
  border-color: #ded8d4;
  color: #302c2a;
  background: #fff2f0;
}

#day .home-stats span:nth-child(4)::before,
#day .home-stats span:nth-child(5)::before {
  background: #f05342;
  box-shadow: 0 0 0 4px rgba(240, 83, 66, .13);
}

#day .home-stats span:last-child {
  grid-column: auto;
  border-color: #bfe3d2;
  color: #087454;
  background: linear-gradient(135deg, #eaf8f1, #f8fdfa);
  font-weight: 900;
}

#day .home-stats span:last-child::before {
  background: #16a06f;
  box-shadow: 0 0 0 4px rgba(22, 160, 111, .14);
}

@media (max-width: 980px) {
  #day .home-stats {
    grid-template-columns: repeat(6, minmax(125px, 1fr));
    overflow-x: auto;
    scrollbar-width: thin;
  }
}

@media (max-width: 560px) {
  #day .home-stats { grid-template-columns: repeat(6, minmax(125px, 1fr)); }
  #day .home-stats span { white-space: normal; }
  #day .home-stats span:last-child { grid-column: auto; }
}

/* Staff schedule and timesheet — compact professional workspace */
#staff .staff-main-full {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#staff > .staff-main > .section-head {
  margin-bottom: 12px;
  padding: 2px 2px 0;
}

#staff > .staff-main > .section-head p {
  font-size: 0;
}

#staff > .staff-main > .section-head p::after {
  color: #9e3f34;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
  content: "Управление персоналом";
}

#staff > .staff-main > .section-head h2 {
  margin-top: 5px;
  color: #302c2a;
  font-size: 27px;
  letter-spacing: -.035em;
}

#staff .timesheet-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 12px;
  margin: 0;
  padding: 15px;
  border: 1px solid #ded8d4;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(48, 44, 42, .08);
}

#staff .timesheet-head {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  min-height: 52px;
  padding: 0 0 13px;
  border-bottom: 1px solid #eeeae7;
}

#staff .timesheet-month-nav {
  justify-self: start;
  padding: 4px;
  border-color: #ded8d4;
  border-radius: 12px;
  background: #faf8f6;
}

#staff .timesheet-month-nav button {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: #4f4946;
}

#staff .timesheet-month-nav button:hover { color: #302c2a; background: #fff; }

#staff .timesheet-month-nav strong {
  min-width: 165px;
  color: #302c2a;
  font-size: 15px;
  letter-spacing: -.01em;
}

#staff .timesheet-view-toggle {
  justify-self: center;
  padding: 4px;
  border: 1px solid #ded8d4;
  border-radius: 12px;
  background: #eeeae7;
}

#staff .timesheet-view-toggle button {
  min-width: 100px;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 12px;
}

#staff .timesheet-view-toggle button.active {
  color: #302c2a;
  background: #fff;
  box-shadow: 0 4px 12px rgba(48, 44, 42, .1);
}

#staff .timesheet-totals {
  justify-self: end;
  gap: 7px;
}

#staff .timesheet-totals span {
  display: grid;
  min-width: 92px;
  min-height: 38px;
  padding: 0 12px;
  place-items: center;
  border: 1px solid #ded8d4;
  border-radius: 11px;
  color: #302c2a;
  background: #faf8f6;
  font-size: 12px;
}

#staff .timesheet-totals span:last-child {
  border-color: #c6e7d7;
  color: #087454;
  background: #eff9f4;
}

#staff .timesheet-brush {
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid #ded8d4;
  border-radius: 13px;
  color: #756d69;
  background: #faf8f6;
}

#staff .timesheet-brush b {
  margin: 0 4px 0 1px;
  color: #756d69;
  font-size: 9px;
  letter-spacing: .09em;
}

#staff .timesheet-brush button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 11px;
  box-shadow: none;
}

#staff .timesheet-brush button.active {
  outline: 0;
  border-color: #302c2a;
  color: #fff;
  background: #302c2a;
  box-shadow: 0 5px 12px rgba(48, 44, 42, .18);
}

#staff .timesheet-search {
  align-self: stretch;
  max-width: none;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid #ded8d4;
  border-radius: 13px;
  color: #756d69;
  background: #faf8f6;
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

#staff .timesheet-search input {
  min-height: 34px;
  border-color: #ded8d4;
  border-radius: 9px;
  background: #fff;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}

#staff .timesheet-desktop,
#staff .timesheet-mobile {
  grid-column: 1 / -1;
}

#staff .timesheet-desktop[hidden],
#staff .timesheet-mobile[hidden] {
  display: none !important;
}

#staff .timesheet-mobile {
  display: grid;
  grid-template-columns: minmax(230px, .72fr) minmax(0, 2fr);
  gap: 12px;
}

#staff .timesheet-staff-filter {
  grid-column: 1 / -1;
  gap: 6px;
  margin: 0;
  color: #756d69;
  font-size: 10px;
  letter-spacing: .055em;
  text-transform: uppercase;
}

#staff .timesheet-staff-filter select {
  height: 42px;
  border-color: #ded8d4;
  border-radius: 10px;
  color: #302c2a;
  background: #fff;
  font-size: 12px;
  font-weight: 750;
  text-transform: none;
}

#staff .timesheet-mobile-stats {
  grid-template-columns: 1fr;
  gap: 8px;
  align-content: start;
}

#staff .timesheet-mobile-stats article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "label hours" "label money";
  align-items: center;
  min-height: 68px;
  padding: 11px 13px;
  border-color: #ded8d4;
  border-radius: 13px;
  text-align: left;
  background: linear-gradient(145deg, #fff, #faf8f6);
}

#staff .timesheet-mobile-stats article:last-child {
  border-color: #bfe4d3;
  background: linear-gradient(145deg, #eff9f4, #fff);
}

#staff .timesheet-mobile-stats span {
  grid-area: label;
  color: #756d69;
  font-size: 10px;
}

#staff .timesheet-mobile-stats b {
  grid-area: hours;
  margin: 0;
  color: #302c2a;
  font-size: 17px;
  text-align: right;
}

#staff .timesheet-mobile-stats small {
  grid-area: money;
  color: #756d69;
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

#staff .timesheet-cal {
  padding: 10px;
  border-color: #ded8d4;
  border-radius: 15px;
  background: #faf8f6;
}

#staff .timesheet-cal-head,
#staff .timesheet-cal-days { gap: 5px; }

#staff .timesheet-cal-head {
  margin-bottom: 6px;
  color: #756d69;
  font-size: 10px;
}

#staff .timesheet-cal-days button,
#staff .timesheet-cal-day {
  min-height: 58px;
  max-height: 64px;
  gap: 4px;
  padding: 5px 3px;
  border-color: #ded8d4;
  border-radius: 9px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

#staff .timesheet-cal-day:hover {
  z-index: 1;
  border-color: #e77f72;
  box-shadow: 0 6px 13px rgba(48, 44, 42, .1);
  transform: translateY(-1px);
}

#staff .timesheet-cal-day b {
  color: #302c2a;
  font-size: 11px;
}

#staff .timesheet-cal-names {
  max-height: 30px;
  gap: 3px;
}

#staff .timesheet-cal-names .shift-badge,
#staff .timesheet-cal-day > .shift-badge {
  padding: 2px 5px;
  border-radius: 5px;
  font-size: 9px;
  line-height: 1.2;
}

#staff .timesheet-cal-days button.weekend,
#staff .timesheet-cal-day.weekend {
  border-color: #f0dfe1;
  background: #fff8f8;
}

#staff .timesheet-cal-days button.today,
#staff .timesheet-cal-day.today {
  border-color: #9e3f34;
  background: #fff2f0;
  box-shadow: inset 0 0 0 1px #9e3f34;
}

#staff .timesheet-scroll {
  max-height: calc(100vh - 355px);
  border-color: #ded8d4;
  border-radius: 14px;
}

@media (max-width: 980px) {
  #staff .timesheet-board { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  #staff .timesheet-head { grid-template-columns: 1fr; }
  #staff .timesheet-month-nav,
  #staff .timesheet-totals { justify-self: stretch; justify-content: space-between; }
}

/* Timesheet matrix refinements and shift editor */
#staff .timesheet-brush .brush-full,
#staff .shift-badge.full_12 {
  border-color: #f5d0cb;
  color: #f05342;
  background: #fff2f0;
}

#staff .timesheet-brush .brush-morning,
#staff .shift-badge.morning_6 {
  border-color: #b5e3c9;
  color: #08754c;
  background: #e7f8ee;
}

#staff .timesheet-brush .brush-evening,
#staff .shift-badge.evening_6 {
  border-color: #eda89f;
  color: #302c2a;
  background: #fff2f0;
}

#staff .timesheet-brush .brush-trainee,
#staff .shift-badge.trainee {
  border-color: #eed28d;
  color: #8a5a08;
  background: #fff4cf;
}

#staff .timesheet-brush .brush-off {
  border-color: #efc9cc;
  color: #a23a43;
  background: #fcedee;
}

#staff .timesheet-brush .brush-modal {
  border-color: #ded8d4;
  color: #4f4946;
  background: #fff;
}

#staff .timesheet-brush button:hover {
  filter: saturate(1.08);
  transform: translateY(-1px);
}

#staff .timesheet-brush button.active {
  border-color: #302c2a;
  color: #fff;
  background: #302c2a;
}

#staff .timesheet-table th.weekend,
#staff .timesheet-table td.weekend {
  border-right-color: #eadbdd;
  border-bottom-color: #eadbdd;
  color: #a6424b;
  background: #fff5f5;
}

#staff .timesheet-table thead th.weekend {
  color: #a72f3b;
  background: #fbecee;
}

#staff .timesheet-table td.weekend .shift-badge {
  box-shadow: 0 0 0 1px rgba(171, 77, 85, .08);
}

#staff .timesheet-cal-head .we {
  color: #b42f3c;
  font-weight: 900;
}

#staff .timesheet-cal-days button.weekend,
#staff .timesheet-cal-day.weekend {
  border-color: #ead7da;
  background: #fff4f5;
}

#staff .timesheet-mobile-stats {
  display: none;
}

#staff .timesheet-mobile {
  grid-template-columns: 1fr;
}

.sheet-backdrop {
  background: rgba(48, 44, 42, .54);
  backdrop-filter: blur(7px);
}

.timesheet-sheet,
.timesheet-sheet.is-dialog {
  overflow: hidden;
  border: 1px solid #ded8d4;
  background: #faf8f6;
  box-shadow: 0 28px 80px rgba(48, 44, 42, .28);
}

.timesheet-sheet.is-dialog {
  width: min(500px, calc(100% - 28px));
  padding: 0 20px 20px;
  border-radius: 20px;
}

.timesheet-sheet.is-dialog .sheet-title-row {
  margin: 0 -20px 17px;
  padding: 19px 20px 16px;
  border-bottom: 1px solid #ded8d4;
  background: linear-gradient(135deg, #fff2f0, #fff 75%);
}

.timesheet-sheet .sheet-title-row strong {
  color: #302c2a;
  font-size: 19px;
  letter-spacing: -.025em;
}

.timesheet-sheet .sheet-title-row small {
  display: block;
  margin-top: 4px;
  color: #756d69;
  font-size: 12px;
  font-weight: 650;
}

.timesheet-sheet .sheet-title-row .ghost {
  display: grid;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid #ded8d4;
  border-radius: 50%;
  color: #756d69;
  background: #fff;
}

.timesheet-sheet .sheet-presets {
  gap: 9px;
  margin-bottom: 13px;
}

.timesheet-sheet .sheet-btn {
  min-height: 67px;
  padding: 10px;
  border-width: 1px;
  border-style: solid;
  border-radius: 13px;
  font-size: 13px;
  transition: transform .15s ease, box-shadow .15s ease;
}

.timesheet-sheet .sheet-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(48, 44, 42, .09);
}

.timesheet-sheet .sheet-btn.full { border-color: #f5d0cb; color: #f05342; background: #fff2f0; }
.timesheet-sheet .sheet-btn.morning { border-color: #b5e3c9; color: #08754c; background: #e7f8ee; }
.timesheet-sheet .sheet-btn.evening { border-color: #eda89f; color: #302c2a; background: #fff2f0; }
.timesheet-sheet .sheet-btn.trainee { border-color: #eed28d; color: #875706; background: #fff4cf; }

.timesheet-sheet .sheet-btn small {
  margin-top: 4px;
  font-size: 10px;
}

.timesheet-sheet .sheet-custom {
  padding: 11px;
  border: 1px solid #ded8d4;
  border-radius: 13px;
  background: #fff;
}

.timesheet-sheet .sheet-clear {
  border-color: #efcbce;
  border-radius: 11px;
  color: #a43e47;
  background: #fff5f5;
}

.timesheet-sheet .js-sheet-duty-wrap {
  gap: 7px;
  color: #756d69;
}

.timesheet-sheet .js-sheet-duty-wrap input {
  min-height: 44px;
  border-color: #ded8d4;
  background: #fff;
}

.timesheet-sheet .js-sheet-duty-save {
  min-height: 48px;
  border-radius: 11px;
  background: linear-gradient(135deg, #16a979, #0c8b65);
  box-shadow: 0 8px 18px rgba(12, 139, 101, .18);
}

/* Calm calendar badges and employee picker */
#staff .timesheet-cal {
  background: #faf8f6;
}

#staff .timesheet-cal-days button,
#staff .timesheet-cal-day {
  min-height: 88px;
  max-height: 96px;
  padding: 7px 5px;
  background: #fff;
}

#staff .timesheet-cal-names {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  width: 100%;
  max-height: 63px;
  overflow: hidden;
}

#staff .timesheet-cal-names .shift-badge,
#staff .timesheet-cal-day > .shift-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: 27px;
  padding: 4px 7px;
  overflow: hidden;
  border: 1px solid #ded8d4;
  border-left-width: 3px;
  border-radius: 6px;
  color: #302c2a;
  background: #faf8f6;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#staff .timesheet-cal-names .shift-badge strong {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#staff .timesheet-cal-names .shift-badge small {
  flex: 0 0 auto;
  color: inherit;
  font-size: 9px;
  font-weight: 850;
  opacity: .78;
  white-space: nowrap;
}

#staff .timesheet-cal-names .shift-badge.full_12,
#staff .timesheet-cal-day > .shift-badge.full_12 {
  border-color: #f5d0cb;
  border-left-color: #f05342;
  color: #4f4946;
  background: #fff2f0;
}

#staff .timesheet-cal-names .shift-badge.morning_6,
#staff .timesheet-cal-day > .shift-badge.morning_6 {
  border-color: #d6e9dd;
  border-left-color: #39a46e;
  color: #28563e;
  background: #f4faf6;
}

#staff .timesheet-cal-names .shift-badge.evening_6,
#staff .timesheet-cal-day > .shift-badge.evening_6 {
  border-color: #ded8d4;
  border-left-color: #f05342;
  color: #302c2a;
  background: #fff2f0;
}

#staff .timesheet-cal-names .shift-badge.custom,
#staff .timesheet-cal-day > .shift-badge.custom {
  border-color: #e4e0d8;
  border-left-color: #9a8060;
  color: #5d5142;
  background: #faf8f4;
}

#staff .timesheet-cal-days button.weekend,
#staff .timesheet-cal-day.weekend {
  border-color: #eadfe0;
  background: #fdf8f8;
}

.js-timesheet-roster-modal {
  background: rgba(48, 44, 42, .54);
  backdrop-filter: blur(8px);
}

.js-timesheet-roster-modal .timesheet-roster-modal-card {
  width: min(620px, calc(100vw - 32px));
  max-height: min(84vh, 720px);
  overflow: hidden;
  padding: 0;
  border: 1px solid #ded8d4;
  border-radius: 21px;
  background: #faf8f6;
  box-shadow: 0 30px 80px rgba(48, 44, 42, .28);
}

.js-timesheet-roster-modal .report-modal-head {
  margin: 0;
  padding: 20px 22px 17px;
  border-bottom: 1px solid #ded8d4;
  background: linear-gradient(135deg, #fff2f0, #fff 75%);
}

.js-timesheet-roster-modal .report-modal-head p {
  color: #9e3f34;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.js-timesheet-roster-modal .report-modal-head h2 {
  margin-top: 4px;
  color: #302c2a;
  font-size: 22px;
  letter-spacing: -.025em;
}

.js-timesheet-roster-modal .close {
  width: 38px;
  height: 38px;
  border: 1px solid #ded8d4;
  border-radius: 50%;
  background: #fff;
}

.js-timesheet-roster-modal .js-timesheet-roster-search {
  width: calc(100% - 44px);
  min-height: 44px;
  margin: 17px 22px 10px;
  border-color: #ded8d4;
  border-radius: 11px;
  background: #fff;
}

.js-timesheet-roster-modal .settings-hint {
  margin: 0;
  padding: 11px 22px 0;
  color: #756d69;
  font-size: 11px;
  line-height: 1.45;
}

.js-timesheet-roster-modal .js-timesheet-roster-pick-list {
  max-height: calc(84vh - 170px);
  overflow: auto;
  gap: 8px;
  padding: 0 22px 22px;
}

.js-timesheet-roster-modal .timesheet-roster-pick {
  min-height: 62px;
  padding: 11px 13px;
  border: 1px solid #ded8d4;
  border-radius: 12px;
  color: #302c2a;
  background: #fff;
  box-shadow: 0 3px 10px rgba(48, 44, 42, .035);
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.js-timesheet-roster-modal .timesheet-roster-pick:hover {
  border-color: #e77f72;
  background: #fff2f0;
  transform: translateY(-1px);
}

.js-timesheet-roster-modal .timesheet-roster-pick:disabled {
  border-style: dashed;
  color: #756d69;
  background: #faf8f6;
  box-shadow: none;
  cursor: default;
  transform: none;
}

.js-timesheet-roster-modal .timesheet-roster-pick strong {
  color: #302c2a;
  font-size: 13px;
}

.js-timesheet-roster-modal .timesheet-roster-pick small {
  margin-top: 4px;
  color: #756d69;
  font-size: 11px;
}

/* Visual staff filter */
#staff .timesheet-staff-visual {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 1px 1px 5px;
  scrollbar-width: thin;
}

#staff .timesheet-staff-card {
  flex: 0 0 210px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid #ded8d4;
  border-radius: 12px;
  color: #302c2a;
  text-align: left;
  background: #fff;
}

#staff .timesheet-staff-card:hover { border-color: #e77f72; background: #fff2f0; }
#staff .timesheet-staff-card.active { border-color: #f05342; background: #fff2f0; box-shadow: 0 0 0 3px rgba(240, 83, 66, .1); }

#staff .timesheet-staff-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #756d69, #302c2a);
  font-size: 11px;
  font-weight: 900;
}

#staff .timesheet-staff-card.active .timesheet-staff-avatar { background: linear-gradient(145deg, #9e3f34, #302c2a); }
#staff .timesheet-staff-card strong,
#staff .timesheet-staff-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#staff .timesheet-staff-card strong { font-size: 12px; }
#staff .timesheet-staff-card small { margin-top: 4px; color: #756d69; font-size: 10px; }

/* Softer issued-gifts action */
#friends .partner-summary button.js-friends-issued-open {
  border-color: #ded8d4;
  color: #302c2a;
  background: linear-gradient(135deg, #faf8f6, #fff);
  box-shadow: 0 6px 16px rgba(48, 44, 42, .055);
}

#friends .partner-summary button.js-friends-issued-open span { color: #756d69; }
#friends .partner-summary button.js-friends-issued-open b { color: #302c2a; }
#friends .partner-summary button.js-friends-issued-open::after { background: rgba(158, 63, 52, .08); }
#friends .partner-summary button.js-friends-issued-open:hover { border-color: #e77f72; box-shadow: 0 9px 20px rgba(48, 44, 42, .1); }

#friends .partner-summary button.js-friends-orders-open {
  border-color: #ead9b0;
  color: #302c2a;
  background: linear-gradient(135deg, #fff6e6, #fff);
  box-shadow: 0 6px 16px rgba(140, 90, 20, .08);
}
#friends .partner-summary button.js-friends-orders-open span { color: #a06b20; }
#friends .partner-summary button.js-friends-orders-open b { color: #c47b12; }
#friends .partner-summary button.js-friends-orders-open::after { background: rgba(196, 123, 18, .12); }
#friends .partner-summary button.js-friends-orders-open:hover { border-color: #e2b15a; box-shadow: 0 9px 20px rgba(140, 90, 20, .12); }

/* Subscription creation dialog */
.tickets-side.mode-create {
  padding: 28px 18px;
  background: rgba(48, 44, 42, .55);
  backdrop-filter: blur(9px);
}

.tickets-side.mode-create > * { width: min(640px, calc(100vw - 36px)); }

.tickets-side.mode-create .ticket-modal-top {
  position: sticky;
  top: 0;
  z-index: 3;
  margin-bottom: -10px;
  padding: 12px 16px 10px;
  border-color: #ded8d4;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(135deg, #fff2f0, #fff 76%);
  box-shadow: 0 10px 24px rgba(48, 44, 42, .1);
}

.tickets-side.mode-create .ticket-modal-top p { color: #9e3f34; font-size: 10px; letter-spacing: .1em; }
.tickets-side.mode-create .ticket-modal-top h2 { color: #302c2a; font-size: 18px; letter-spacing: -.03em; margin: 0; }
.tickets-side.mode-create .ticket-modal-top .close { width: 32px; height: 32px; border: 1px solid #ded8d4; border-radius: 50%; background: #fff; }

.tickets-side.mode-create .ticket-create-box {
  display: grid;
  gap: 8px;
  padding: 14px 16px 14px;
  border: 1px solid #ded8d4;
  border-radius: 0 0 16px 16px;
  background: #faf8f6;
  box-shadow: 0 20px 50px rgba(48, 44, 42, .2);
}

.tickets-side.mode-create .ticket-create-box > h3 { margin: 0; color: #302c2a; font-size: 14px; }
.tickets-side.mode-create .money-input { color: #756d69; font-size: 11px; gap: 4px; }
.tickets-side.mode-create .money-input input { min-height: 36px; border-color: #ded8d4; border-radius: 8px; background: #fff; }

.tickets-side.mode-create .ticket-choice-grid {
  gap: 6px;
  padding: 8px;
  border: 1px solid #ded8d4;
  border-radius: 10px;
  background: #fff;
}

.tickets-side.mode-create .ticket-choice-grid button,
.tickets-side.mode-create .discount-actions button {
  min-height: 36px;
  border-radius: 8px;
  font-size: 13px;
}

.tickets-side.mode-create .ticket-choice-grid button.active,
.tickets-side.mode-create .discount-actions button.active {
  border-color: #f05342;
  color: #302c2a;
  background: #fff2f0;
  box-shadow: 0 0 0 2px rgba(240, 83, 66, .09);
}

.tickets-side.mode-create .discount-actions { gap: 6px; }

.tickets-side.mode-create .ticket-promocode {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  align-items: end;
  padding: 8px;
  border: 1px solid #ded8d4;
  border-radius: 10px;
  background: #fff;
}

.tickets-side.mode-create .ticket-promocode .money-input { grid-column: 1 / -1; }
.tickets-side.mode-create .ticket-promocode small { grid-column: 1 / -1; }

.tickets-side.mode-create .ticket-summary {
  padding: 8px 12px;
  border: 1px solid #bfe4d3;
  border-radius: 10px;
  background: linear-gradient(135deg, #edf9f3, #fff);
}

.tickets-side.mode-create .ticket-summary strong { color: #087454; font-size: 18px; }
.tickets-side.mode-create .ticket-rules-card { font-size: 12px; line-height: 1.35; }
.tickets-side.mode-create .js-ticket-to-receipt { min-height: 42px; border-radius: 10px; background: linear-gradient(135deg, #18aa79, #0c8b65); box-shadow: 0 6px 14px rgba(12,139,101,.18); }

/* Settings workspace — structured sections */
#settings .settings-layout {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

#settings .settings-main,
#settings .settings-side {
  border: 1px solid #ded8d4;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(48, 44, 42, .07);
}

#settings .settings-main { padding: 20px; }
#settings .section-head { margin-bottom: 17px; padding-bottom: 15px; border-bottom: 1px solid #eeeae7; }
#settings .section-head p { color: #9e3f34; font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
#settings .section-head h2 { margin-top: 5px; color: #302c2a; font-size: 26px; letter-spacing: -.035em; }
#settings .section-head .add { min-height: 39px; padding: 0 15px; border: 1px solid #ded8d4; border-radius: 10px; color: #4f4946; background: #faf8f6; }

#settings .settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid #ded8d4;
  border-radius: 16px;
  background: #faf8f6;
}

#settings .setting-toggle {
  position: relative;
  display: flex;
  gap: 11px;
  align-items: center;
  min-height: 68px;
  padding: 11px 13px;
  border: 1px solid #ded8d4;
  border-radius: 12px;
  color: #302c2a;
  background: #fff;
  transition: border-color .15s ease, background .15s ease;
}

#settings .setting-toggle:hover { border-color: #e77f72; background: #fff2f0; }
#settings .setting-toggle input[type="checkbox"] {
  appearance: none;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  padding: 0;
  border: 2px solid #c2bab6;
  border-radius: 7px;
  background: #fff;
}

#settings .setting-toggle input[type="checkbox"]:checked {
  border-color: #9e3f34;
  background: #9e3f34;
  box-shadow: inset 0 0 0 4px #fff;
}

#settings .setting-toggle strong,
#settings .setting-toggle small { display: block; }
#settings .setting-toggle strong { color: #302c2a; font-size: 13px; }
#settings .setting-toggle small { margin-top: 4px; color: #756d69; font-size: 11px; }

#settings .settings-admin { margin-top: 16px; }
#settings .settings-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  padding: 8px;
  border: 1px solid #ded8d4;
  border-radius: 15px;
  background: #eeeae7;
}

#settings .settings-tabs button {
  min-height: 40px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #756d69;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

#settings .settings-tabs button:hover { color: #302c2a; background: #fff; }
#settings .settings-tabs button.active { border-color: #e77f72; color: #302c2a; background: #fff; box-shadow: 0 5px 12px rgba(48, 44, 42, .1); }

#settings .settings-admin > section {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid #ded8d4;
  border-radius: 16px;
  background: #fff;
}

#settings .settings-admin > section[hidden] { display: none !important; }
#settings .settings-admin > section > h3 { margin: 0 0 15px; color: #302c2a; font-size: 17px; }
#settings .settings-form { gap: 12px; }
#settings .settings-form label { color: #756d69; font-size: 11px; font-weight: 800; }
#settings input,
#settings select,
#settings textarea { border-color: #ded8d4; border-radius: 10px; background: #faf8f6; }

#settings .settings-side {
  position: sticky;
  top: 18px;
  padding: 19px;
}

#settings .settings-side h3 { color: #302c2a; font-size: 16px; }
#settings .settings-side p { color: #756d69; font-size: 12px; line-height: 1.6; }
#settings .settings-side .confirm { min-height: 48px; border-radius: 11px; }

/* Ticket pricing editor by duration */
#settings .js-ticket-settings-list { display: grid; gap: 12px; }
#settings .ticket-setting-row {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid #ded8d4;
  border-radius: 15px;
  background: #faf8f6;
}

#settings .ticket-setting-main { display: grid; gap: 10px; align-content: start; }
#settings .ticket-setting-main > label { display: grid; gap: 5px; color: #756d69; font-size: 10px; font-weight: 800; }
#settings .ticket-setting-main input { width: 100%; min-height: 40px; }
#settings .ticket-setting-promos { display: flex; gap: 8px; }
#settings .ticket-setting-promos label { flex: 1; display: flex; gap: 7px; align-items: center; min-height: 38px; padding: 7px 9px; border: 1px solid #ded8d4; border-radius: 9px; color: #4f4946; background: #fff; font-size: 10px; font-weight: 750; }
#settings .ticket-setting-promos input { appearance: none; width: 18px; height: 18px; min-height: 18px; padding: 0; border: 2px solid #c2bab6; border-radius: 5px; }
#settings .ticket-setting-delete { width: 100%; min-height: 38px; margin-top: 2px; }
#settings .ticket-setting-promos input:checked,
#settings .setting-toggle input[type="checkbox"]:checked {
  border-color: #9e3f34;
  background-color: #9e3f34;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.4' d='m3.2 8.2 3 3 6.6-7'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 13px;
  box-shadow: none;
}

#settings .ticket-setting-periods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 9px;
}

#settings .ticket-setting-periods section {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid #ded8d4;
  border-radius: 12px;
  background: #fff;
}

#settings .ticket-setting-periods section:nth-child(2) { border-color: #cce4de; background: #f6fbf9; }
#settings .ticket-setting-periods section:nth-child(3) { border-color: #b9dcd3; background: #eef8f5; }
#settings .ticket-setting-periods strong { color: #302c2a; font-size: 12px; }
#settings .ticket-setting-periods label { display: grid; gap: 4px; color: #756d69; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
#settings .ticket-setting-periods input { width: 100%; min-height: 38px; color: #302c2a; font-size: 13px; font-weight: 800; }
#settings .ticket-setting-custom-period {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  gap: 9px;
  padding-top: 2px;
}
#settings .ticket-setting-custom-period label { display: grid; gap: 4px; color: #756d69; font-size: 10px; font-weight: 800; }
#settings .ticket-setting-custom-period input { width: 150px; min-height: 38px; }
#settings .ticket-setting-custom-period button { min-height: 38px; }
#settings .js-ticket-type-add { width: 100%; min-height: 44px; margin-top: 12px; border-radius: 11px; color: #fff; background: linear-gradient(135deg, #302c2a, #302c2a); }

@media (max-width: 980px) {
  #settings .settings-layout { grid-template-columns: 1fr; }
  #settings .settings-side { position: static; }
  #settings .settings-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #settings .ticket-setting-row { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  #settings .settings-grid { grid-template-columns: 1fr; }
  #settings .settings-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #settings .ticket-setting-periods { grid-template-columns: 1fr; }
  #settings .ticket-setting-custom-period { align-items: stretch; flex-direction: column; }
  #settings .ticket-setting-custom-period input { width: 100%; }
}

/* Settings information architecture and marketing tools */
#settings .settings-layout { grid-template-columns: minmax(0, 1fr); max-width: 1320px; margin: 0 auto; }
#settings .settings-main { min-width: 0; }
#settings .settings-grid[hidden] { display: none !important; }
#settings .settings-tabs { grid-template-columns: repeat(5, minmax(120px, 1fr)); }
#settings .settings-panel-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
#settings .settings-panel-title.settings-panel-title-spaced { margin-top: 28px; padding-top: 22px; border-top: 1px solid #eeeae7; }
#settings .settings-panel-title h3 { margin: 0 0 4px; }
#settings .settings-panel-title p { margin: 0; color: #756d69; font-size: 12px; }

#settings .promotions-settings { display: grid; gap: 14px; }
#settings .promotion-setting-row {
  display: block;
  padding: 16px;
  border: 1px solid #ded8d4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(48, 44, 42, .055);
}
#settings .promotion-setting-row.is-hidden { opacity: .7; background: #faf8f6; }
#settings .promotion-setting-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #eeeae7; }
#settings .promotion-setting-head strong,
#settings .promotion-setting-head small { display: block; }
#settings .promotion-setting-head strong { color: #302c2a; font-size: 15px; }
#settings .promotion-setting-head small { margin-top: 3px; color: #756d69; font-size: 11px; }
#settings .promotion-setting-actions { display: flex; gap: 7px; }
#settings .promotion-setting-fields { display: grid; grid-template-columns: minmax(220px, 1.5fr) 120px 150px 150px; gap: 10px; padding-top: 13px; }
#settings .promotion-setting-fields label { display: grid; gap: 5px; color: #756d69; font-size: 10px; font-weight: 800; }
#settings .promotion-setting-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
#settings .setting-toggle.compact { width: auto; min-width: 160px; min-height: 40px; padding: 8px 11px; }
#settings .promotion-gifts { margin-top: 11px; padding: 12px; border: 1px solid #ded8d4; border-radius: 12px; background: #f5faf8; }
#settings .promotion-gift-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
#settings .promotion-gift-category-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 10px; }
#settings .promotion-gift-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
#settings .promotion-gift-chips button { min-height: 32px; padding: 5px 9px; border: 1px solid #c2bab6; border-radius: 9px; color: #302c2a; background: #fff; font-size: 11px; font-weight: 800; }
#settings .promotion-gift-chips button span { margin-left: 6px; color: #a33e43; }
.danger-soft { min-height: 34px; padding: 6px 10px; border: 1px solid #eccfd1; border-radius: 9px; color: #a23b43; background: #fff7f7; font-weight: 800; }
.danger-soft:hover { border-color: #dfaeb2; background: #fff0f1; }

#settings .promocode-toolbar { display: flex; justify-content: flex-end; margin: -38px 0 14px; }
#settings .promocode-settings { display: grid; gap: 9px; }
#settings .promocode-row { display: grid; grid-template-columns: minmax(220px, 1.5fr) 150px 90px auto; align-items: center; gap: 12px; padding: 12px 13px; border: 1px solid #ded8d4; border-radius: 13px; background: #fff; }
#settings .promocode-row.inactive { background: #faf8f6; opacity: .72; }
#settings .promocode-row .promocode-code strong,
#settings .promocode-row .promocode-code small,
#settings .promocode-row b small { display: block; }
#settings .promocode-row .promocode-code strong { color: #302c2a; letter-spacing: .08em; }
#settings .promocode-row small { margin-top: 3px; color: #756d69; font-size: 10px; }
#settings .promocode-row em { justify-self: start; padding: 5px 8px; border-radius: 99px; color: #302c2a; background: #e5f6f1; font-size: 10px; font-style: normal; font-weight: 850; }
#settings .promocode-row.inactive em { color: #756d69; background: #eeeae7; }
#settings .promocode-row > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(94px, 1fr));
  gap: 8px;
  justify-content: end;
}
#settings .promocode-row > div > button {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  height: 36px;
  margin: 0;
  padding: 0 10px;
  border-radius: 9px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
}
#settings .promocode-count { margin: 3px 0 0; color: #756d69; font-size: 11px; }
#settings .promocode-form { margin-top: 14px; padding: 15px; border: 1px solid #ded8d4; border-radius: 14px; background: #faf8f6; }
#settings .promocode-form[hidden] { display: none !important; }

#settings .single-visit-setting { max-width: 360px; margin-bottom: 14px; padding: 12px; border: 1px solid #d9e8e4; border-radius: 12px; background: #f5faf8; }
#settings .settings-fast-search { display: grid; max-width: 520px; gap: 6px; margin-bottom: 12px; color: #756d69; font-size: 10px; font-weight: 850; text-transform: uppercase; }
#settings .settings-fast-goods { grid-template-columns: repeat(3, minmax(0, 1fr)); }

#settings .product-settings-toolbar { grid-template-columns: minmax(220px, 1.5fr) minmax(150px, .85fr) minmax(140px, .75fr) minmax(190px, 1fr); padding: 12px; border: 1px solid #ded8d4; border-radius: 13px; background: #faf8f6; }
#settings .product-settings-head { margin-top: 12px; padding: 8px 12px; border-radius: 9px; background: #eeeae7; color: #756d69; }
#settings .product-setting-row { margin-top: 7px; padding: 10px 12px; border: 1px solid #ded8d4; border-radius: 11px; background: #fff; box-shadow: 0 4px 12px rgba(48, 44, 42, .035); }
#settings .product-setting-row:focus-within { border-color: #e77f72; box-shadow: 0 0 0 3px rgba(158, 63, 52, .09); }
#settings .product-archive-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; padding: 13px 14px; border: 1px solid #ded8d4; border-radius: 13px; background: #faf8f6; }
#settings .product-archive-tools strong,
#settings .product-archive-tools small { display: block; }
#settings .product-archive-tools strong { color: #302c2a; font-size: 13px; }
#settings .product-archive-tools small { margin-top: 3px; color: #756d69; font-size: 10px; }
#settings .product-archive-tools button:disabled { cursor: not-allowed; opacity: .5; }

#settings .product-category-editor { margin: 14px 0; padding: 14px; border: 1px solid #ded8d4; border-radius: 15px; background: #faf8f6; }
#settings .product-category-editor-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
#settings .product-category-editor-head strong,
#settings .product-category-editor-head small { display: block; }
#settings .product-category-editor-head strong { color: #302c2a; font-size: 14px; }
#settings .product-category-editor-head small { margin-top: 3px; color: #756d69; font-size: 10px; }
#settings .product-category-create { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 8px; min-width: 420px; }
#settings .product-category-create input { min-height: 40px; }
#settings .product-category-create .add { min-height: 40px; white-space: nowrap; }
#settings .product-category-editor-list { display: grid; gap: 7px; margin-top: 12px; }
#settings .product-category-editor-row { display: grid; grid-template-columns: minmax(220px, 1.2fr) minmax(210px, 1.2fr) auto; gap: 12px; align-items: center; padding: 10px 11px; border: 1px solid #ded8d4; border-radius: 11px; background: #fff; }
#settings .product-category-title-field { display: grid; gap: 4px; color: #756d69; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .035em; }
#settings .product-category-title-field input { min-height: 36px; text-transform: none; letter-spacing: normal; font-weight: 700; color: #302c2a; font-size: 13px; }
#settings .product-category-title-field small,
#settings .category-empty-label { margin-top: 2px; color: #756d69; font-size: 10px; font-weight: 650; text-transform: none; letter-spacing: normal; }
#settings .product-category-editor-row label { display: grid; gap: 4px; color: #756d69; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .035em; }
#settings .product-category-editor-row select { min-height: 36px; }
#settings .product-category-editor-actions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
#settings .product-category-editor-row .danger-soft:disabled { cursor: not-allowed; opacity: .45; }

#settings [data-settings-panel="staff"] .settings-staff-toolbar { margin-bottom: 11px; }
#settings [data-settings-panel="staff"] .settings-staff-head { padding: 8px 11px; border-radius: 9px; background: #eeeae7; }
#settings [data-settings-panel="staff"] .settings-staff-row { margin-top: 7px; border: 1px solid #ded8d4; border-radius: 11px; background: #fff; }

#settings .shift-tags-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
#settings .shift-tags-settings article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; align-items: center; padding: 9px; border: 1px solid #ded8d4; border-radius: 11px; background: #fff; }
#settings .shift-tags-settings article.new-tag { grid-template-columns: 1fr; border-style: dashed; background: #faf8f6; }
#settings .shift-tags-settings article.new-tag span { color: #756d69; font-size: 10px; }
#settings .settings-tool-card { min-width: 0; padding: 14px; border: 1px solid #ded8d4; border-radius: 14px; background: #faf8f6; }
#settings .settings-tool-card .section-head h2 { font-size: 16px; }

.ticket-promo-gifts { display: grid; gap: 4px; margin-bottom: 10px; padding: 11px 12px; border: 1px solid #bfe0d7; border-radius: 12px; background: #f0faf6; }
.ticket-promo-gifts[hidden] { display: none !important; }
.ticket-promo-gifts strong { color: #302c2a; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.ticket-promo-gifts span { color: #302c2a; font-size: 13px; font-weight: 850; }
.ticket-promo-gifts small { color: #756d69; font-size: 10px; }
.ticket-promo-gift-choices { display: grid; gap: 8px; margin-top: 4px; }
.ticket-promo-gift-choices label { display: grid; gap: 5px; color: #4f4946; font-size: 12px; font-weight: 750; }
.ticket-promo-gift-choices select { min-height: 38px; }

@media (max-width: 900px) {
  #settings .promotion-setting-fields { grid-template-columns: 1fr 1fr; }
  #settings .promocode-row { grid-template-columns: 1fr 120px; }
  #settings .promocode-row > div { grid-column: 1 / -1; width: min(100%, 330px); justify-content: start; }
  #settings .settings-fast-goods { grid-template-columns: 1fr 1fr; }
  #settings .product-settings-toolbar { grid-template-columns: 1fr 1fr; }
  #settings .product-category-editor-head { align-items: stretch; flex-direction: column; }
  #settings .product-category-create { min-width: 0; }
  #settings .product-category-editor-row { grid-template-columns: 1fr minmax(210px, 1fr) auto; }
  #settings .product-archive-tools { align-items: stretch; flex-direction: column; }
}

@media (max-width: 620px) {
  #settings .settings-tabs,
  #settings .promotion-setting-fields,
  #settings .settings-fast-goods,
  #settings .shift-tags-settings { grid-template-columns: 1fr; }
  #settings .promotion-setting-head,
  #settings .settings-panel-title { align-items: flex-start; flex-direction: column; }
  #settings .promocode-toolbar { margin: 0 0 12px; justify-content: flex-start; }
  #settings .promocode-row { grid-template-columns: 1fr; }
  #settings .promocode-row > div { width: 100%; }
  #settings .product-settings-toolbar,
  #settings .product-category-create,
  #settings .product-category-editor-row { grid-template-columns: 1fr; }
  #settings .product-category-editor-actions { justify-content: stretch; }
  #settings .product-category-editor-actions .ghost,
  #settings .product-category-editor-row .danger-soft { width: 100%; }
}

.settings-subhead {
  margin-top: 18px;
}

.js-header-expense-button {
  white-space: nowrap;
  justify-content: center;
  cursor: pointer;
}

.shift-header-button {
  min-width: 148px;
}

.client-note-item {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 14px 16px;
}

.client-note-view {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}

.client-note-main {
  min-width: 0;
  flex: 1;
}

.client-note-text {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  line-height: 1.45;
}

.client-note-author,
.client-note-date {
  color: var(--muted);
}

.client-note-item .client-card-list-meta {
  flex: 0 0 auto;
}

.trainers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.trainer-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(48, 44, 42, .06);
}

.trainer-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.trainer-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.trainer-contacts {
  display: grid;
  gap: 8px;
  margin: 0;
}

.trainer-contacts > div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  align-items: baseline;
}

.trainer-contacts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.trainer-contacts dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.trainer-card-actions,
.trainer-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trainer-modal-card,
.task-modal-card {
  width: min(520px, calc(100vw - 32px));
  padding: 0 0 18px;
}

.trainer-modal-card .acc-form,
.task-modal-card .acc-form {
  padding: 0 18px;
}

.tasks-table-head,
.task-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) .7fr .55fr 220px;
  gap: 10px;
  align-items: center;
}

.tasks-table-head {
  padding: 0 8px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.task-row {
  min-height: 64px;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid #eeeae7;
  border-radius: 13px;
  background: #fff;
}

.task-row strong,
.task-row small {
  display: block;
}

.task-row small {
  margin-top: 4px;
  color: var(--muted);
}

.task-row.is-done {
  opacity: .72;
}

.task-row.is-done strong {
  text-decoration: line-through;
}

.task-status {
  width: max-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e8f8ef;
  color: #176b3a;
  font-size: 12px;
}

.task-status.done {
  background: #eeeae7;
  color: #756d69;
}

.task-pin {
  color: #9e3f34 !important;
  font-weight: 800;
}

.task-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.task-row-actions button {
  min-height: 32px;
  padding: 0 10px;
}

.acc-quick-expense {
  display: grid;
  gap: 12px;
}

.accounting-modal-card.acc-modal-expense {
  width: min(860px, calc(100vw - 32px));
  max-width: 860px;
}

@media (max-width: 860px) {
  .tasks-table-head { display: none; }
  .task-row {
    grid-template-columns: 1fr auto;
  }
  .task-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .client-note-view {
    flex-direction: column;
  }
  .topbar { grid-template-columns: max-content 50px max-content; }
  .topbar .js-header-expense-button { display: none; }
}

.attention-panel {
  display: grid;
  gap: 4px;
  margin: 0 0 10px;
}

.attention-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
}

.attention-panel-head > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.attention-panel-head p {
  margin: 0;
  color: #9a918d;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.attention-panel-head strong {
  color: #302c2a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.2;
}

.attention-panel-head .ghost {
  width: auto;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 850;
}

.attention-panel.is-collapsed .attention-board {
  display: none;
}

.attention-panel.is-collapsed {
  margin-bottom: 6px;
}

.trainer-modal-card .report-modal-head .close,
.task-modal-card .report-modal-head .close,
.js-certificate-edit-modal .report-modal-head .close {
  position: relative;
  z-index: 3;
  flex: 0 0 34px;
}

.trainer-modal-card .confirm,
.task-modal-card .confirm,
.js-certificate-edit-modal .confirm,
.trainer-card-actions .confirm,
.task-row-actions .confirm,
#tasks .js-task-new,
.trainer-modal-actions .confirm {
  width: auto;
  min-height: 38px;
  margin-top: 0;
  padding: 0 14px;
  border-radius: 10px;
}

.trainer-modal-card .ghost,
.task-modal-card .ghost,
.js-certificate-edit-modal .ghost,
.trainer-card-actions .ghost,
.task-row-actions .ghost,
.trainer-modal-actions .ghost {
  width: auto;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
}

.task-row-actions button,
.trainer-card-actions button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.certificate-edit-card {
  width: min(720px, calc(100vw - 32px));
  padding: 0 0 18px;
}

.certificate-edit-form {
  padding: 0 18px 8px;
}

.certificate-edit-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.js-certificate-edit-modal .certificate-history {
  max-height: 180px;
  overflow: auto;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #eeeae7;
  border-radius: 10px;
  background: #faf8f6;
}

.js-certificate-edit-modal .certificate-history div {
  padding: 4px 0;
  border-bottom: 1px solid #eeeae7;
}

.js-certificate-edit-modal .certificate-history div:last-child {
  border-bottom: 0;
}

#certificates .certificates-register-head,
#certificates .certificates-register-row {
  grid-template-columns: minmax(90px, .55fr) minmax(110px, .7fr) minmax(180px, 1.4fr) minmax(160px, 1fr) minmax(100px, .55fr) minmax(190px, auto);
}

.certificates-register-row {
  cursor: default;
}

.certificates-register-row .js-certificate-pay-row {
  border: 0;
  background: transparent;
  padding: 0;
  min-height: 0;
  color: inherit;
  text-align: left;
}

#certificates .certificates-register-row .ghost {
  width: auto;
  min-height: 32px;
  margin: 0;
  padding: 0 10px;
  font-size: 12px;
}

#certificates .certificate-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

@media (max-width: 860px) {
  #certificates .certificates-register-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  #certificates .certificates-register-row > span:nth-child(3),
  #certificates .certificates-register-row > span:nth-child(4),
  #certificates .certificate-row-actions {
    grid-column: 1 / -1;
  }

  #certificates .certificate-row-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-top: 4px;
  }
}

@media (max-width: 860px) {
  .certificate-edit-grid {
    grid-template-columns: 1fr 1fr;
  }
  .attention-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 120px;
  }
}



/* === CRM25: topbar day stats, rail icons, attention, notes, search clear === */
.rail-ico {
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 auto;
  fill: currentColor;
  pointer-events: none;
  transition: transform .16s ease;
}

.rail-ico-stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-ruble {
  color: currentColor;
  font-family: "Segoe UI Symbol", "Arial Unicode MS", sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.rail-btn:hover .rail-ico { transform: scale(1.06); }
.rail-btn.active .rail-ico { transform: scale(1.03); }
.rail-btn { display: grid; place-items: center; }
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  grid-template-columns: none;
  min-height: 52px;
  height: auto;
  padding: 6px 0;
}
.topbar h1 { margin: 0; font-size: 20px; letter-spacing: .06em; }
.topbar-day-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-right: auto;
}
.topbar-day-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid #eeeae7;
  border-radius: 8px;
  background: #fff2f0;
  color: #4f4946;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.topbar .birthday-gift,
.topbar .status-pill,
.topbar .profile {
  min-height: 36px;
  height: 36px;
}
.topbar .shift-header-button { padding: 0 12px; font-size: 12px; }
.topbar .js-header-expense-button { padding: 0 10px; font-size: 12px; }
.topbar .profile { padding: 0 8px; gap: 6px; }
.topbar .profile-meta strong { font-size: 12px; }
.topbar .profile-meta small { font-size: 10px; }
.attention-panel {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #eeeae7;
  border-radius: 14px;
  background: #fff2f0;
}
.attention-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.attention-panel-head p { margin: 0; font-size: 10px; color: #756d69; text-transform: uppercase; letter-spacing: .04em; }
.attention-panel-head strong { font-size: 13px; color: #302c2a; }
.attention-board {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: none;
  margin: 0;
}
.attention-board button,
.attention-friends-order {
  width: auto;
  max-width: 260px;
  min-width: 150px;
  flex: 0 1 auto;
  display: grid;
  gap: 2px;
  padding: 7px 10px 7px 12px;
  border: 1px solid #eeeae7;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  box-shadow: inset 3px 0 0 #e77f72;
  cursor: pointer;
  overflow: hidden;
}
.attention-board button strong,
.attention-friends-order strong { font-size: 11px; color: #302c2a; }
.attention-board button span,
.attention-friends-order span { font-size: 10px; color: #756d69; line-height: 1.25; }
.attention-board button.warn,
.attention-friends-order.warn { box-shadow: inset 3px 0 0 #e0a35a; }
.attention-board button.danger { box-shadow: inset 3px 0 0 #d76a6a; }
.attention-client-link {
  border: 0; background: none; padding: 0; color: #9e3f34; font-size: 11px; font-weight: 800; text-align: left; cursor: pointer;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.attention-empty { padding: 8px 10px; border-radius: 10px; background: #eef8f4; }
.desk-notes-panel {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #eeeae7;
  border-radius: 14px;
  background: #fffdf7;
}
.desk-notes-panel.is-collapsed .desk-notes-board { display: none; }
.desk-notes-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.desk-notes-head p { margin: 0; font-size: 10px; color: #9a8b6a; text-transform: uppercase; }
.desk-notes-actions { display: flex; gap: 6px; }
.desk-notes-board { display: flex; flex-wrap: wrap; gap: 8px; }
.desk-note-card {
  width: 180px;
  padding: 10px;
  border: 1px solid #f0e2b8;
  border-radius: 10px;
  background: #fff8dc;
  display: grid;
  gap: 6px;
}
.desk-note-card textarea {
  width: 100%;
  min-height: 64px;
  border: 1px solid #ead9a8;
  border-radius: 8px;
  padding: 6px;
  font: inherit;
  resize: vertical;
  background: #fffef6;
}
.desk-note-meta { font-size: 10px; color: #8a7a55; }
.desk-note-actions { display: flex; gap: 4px; justify-content: flex-end; }
.search-field-wrap { position: relative; display: block; }
.search-field-wrap input { width: 100%; padding-right: 32px; }
.search-clear,
.lookup-row .search-clear {
  position: absolute;
  right: 7px;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  background: #302c2a;
  color: #fff;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
}
.search-clear::before,
.search-clear::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
}
.search-clear::before { transform: rotate(45deg); }
.search-clear::after { transform: rotate(-45deg); }
.lookup-row .search-clear:hover { filter: brightness(1.08); }
.search-clear[hidden] { display: none !important; }
.visit-period { display: grid; gap: 6px; }
.visit-filters {
  grid-template-columns: minmax(240px, 1.5fr) repeat(2, minmax(132px, .7fr)) minmax(260px, 1fr) 126px;
  align-items: end;
  gap: 12px;
}
.visit-filters > label,
.visit-period { min-width: 0; }
.visit-period-controls {
  display: grid;
  grid-template-columns: auto minmax(132px, 1fr);
  align-items: center;
  gap: 8px;
}
.visit-period-controls input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.segmented { min-height: 38px; white-space: nowrap; }
.segmented button { min-height: 36px; }
.cash-filters {
  grid-template-columns: minmax(220px, 1.4fr) 108px minmax(155px, .9fr) 110px 140px 140px minmax(150px, .9fr);
}
@media (max-width: 1280px) {
  .visit-filters { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(130px, .65fr)) minmax(250px, 1fr); }
  .visit-filters > label:last-child { grid-column: 4; }
  .cash-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .visit-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visit-filters > label:last-child { grid-column: auto; }
}
@media (max-width: 560px) {
  .visit-filters { grid-template-columns: 1fr; }
  .visit-period-controls { grid-template-columns: 1fr; }
  .segmented { width: 100%; }
  .segmented button { flex: 1 1 50%; }
}
.segmented { display: inline-flex; border: 1px solid #ded8d4; border-radius: 8px; overflow: hidden; }
.segmented button { border: 0; background: #fff; padding: 6px 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
.segmented button.active { background: #f5d0cb; color: #9e3f34; }
.certificate-apply-btn { margin-top: 6px; width: 100%; }
.certificate-apply-btn[hidden] { display: none !important; }
.checkout-box .js-certificate-pay[hidden],
.product-checkout .js-certificate-pay[hidden],
.checkout-box .js-certificate-remainder[hidden],
.product-checkout .js-certificate-remainder[hidden],
.checkout-box .js-combo-pay[hidden],
.product-checkout .js-combo-pay[hidden] { display: none !important; }
.friends-list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #eeeae7;
  border-radius: 8px;
  background: #fff;
}
.friends-list-row + .friends-list-row { margin-top: 6px; }
#friends .partner-list.js-friends-list {
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: max-content;
  align-content: start;
  min-height: 0;
}
#friends .friends-list-row {
  width: 100%;
  min-height: 52px;
  max-height: 58px;
  text-align: left;
}
.search-suggestion-row.is-active-ticket { background: #e7f7ef; border: 1px solid #93d8bb; }
.search-suggestion-row.is-inactive-ticket { background: #eeeae7; border: 1px solid #ded8d4; color: #756d69; }
.search-suggestion-row .sug-active { color: #087a57; font-weight: 900; }
.search-suggestion-row .sug-frozen { color: #9e3f34; font-weight: 900; }
.search-suggestion-row .sug-debt { color: #b45309; }
.search-suggestion-row .sug-comment { color: #5f5652; }
.product-modal-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.product-modal-actions .danger {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #e7b6b6;
  border-radius: 8px;
  background: #fff3f3;
  color: #ae3e3e;
  font-weight: 850;
  cursor: pointer;
}
.product-modal-actions .danger[hidden] { display: none; }
.settings-work-date { margin: 10px 0 14px; }
.cash-item-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; }
.cash-item-list .js-cashbox-item-refund {
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid #f0caca;
  border-radius: 7px;
  background: #fff7f7;
  color: #ad4545;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.cash-item-list .js-cashbox-item-refund:hover { background: #feecec; border-color: #e9abab; }
.home-stats[hidden] { display: none !important; }

@media (max-width: 720px) {
  .attention-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attention-board button,
  .attention-friends-order { width: 100%; min-width: 0; max-width: none; }
  .desk-note-card { width: 100%; }
}

@media (max-width: 480px) {
  .attention-board { grid-template-columns: 1fr; }
}

/* === CRM26: compact front-desk workspace === */
@media (min-width: 861px) {
  .topbar {
    flex-wrap: nowrap;
    min-height: 48px;
    padding: 4px 0;
    gap: 8px;
  }

  .topbar-day-stats {
    flex-wrap: nowrap;
    min-width: 0;
  }

  .topbar-day-stats span {
    min-height: 26px;
    padding-inline: 7px;
  }

  .topbar .birthday-gift,
  .topbar .status-pill,
  .topbar .profile {
    min-height: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .topbar .birthday-gift {
    width: 42px;
    min-width: 42px;
  }

  .topbar .profile {
    max-width: 270px;
    padding: 0 4px 0 7px;
  }

  .topbar .profile-meta strong { max-width: 150px; }

  .profile .js-logout {
    width: auto;
    min-width: 60px;
    height: 26px;
    padding: 0 9px;
    border-radius: 7px;
    flex: 0 0 auto;
  }

  .day-layout {
    grid-template-columns: minmax(620px, 1fr) 300px;
    gap: 12px;
  }

  .home-desk {
    padding: 12px;
    border-radius: 14px;
  }

  .home-head:has(> div:empty):has(.home-stats[hidden]) { display: none; }

  .desk-notes-panel,
  .attention-panel {
    margin-bottom: 9px;
    padding: 8px 10px;
    border-radius: 10px;
  }

  .desk-notes-head,
  .attention-panel-head { margin-bottom: 6px; }

  .desk-notes-panel.is-collapsed .desk-notes-head,
  .attention-panel.is-collapsed .attention-panel-head { margin-bottom: 0; }

  .desk-notes-actions button,
  .attention-panel-head > button {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 11px;
  }

  .desk-notes-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 6px;
  }

  .desk-note-card {
    width: auto;
    min-width: 0;
    padding: 8px;
    gap: 4px;
    border-radius: 8px;
  }

  .desk-note-card textarea {
    min-height: 42px;
    max-height: 76px;
  }

  .attention-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .attention-board button,
  .attention-friends-order {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 58px;
    padding: 6px 8px 6px 11px;
    border-radius: 8px;
  }

  .service-grid { gap: 10px; }

  .client-workbench,
  .today-flow {
    padding: 12px;
    border-radius: 12px;
  }

  .mini-title {
    grid-template-columns: 38px 1fr;
    gap: 10px;
    margin-bottom: 10px;
  }

  .mini-title > span {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .mini-title h3 { font-size: 16px; }
  .mini-title p { font-size: 12px; }

  .lookup-row {
    gap: 8px;
    margin-bottom: 9px;
  }

  .lookup-row button { min-height: 38px; }

  .home-checkout {
    top: 12px;
    padding: 12px;
    gap: 12px;
    border-radius: 14px;
  }

  .checkout-box,
  .fast-goods {
    border-radius: 12px;
    box-shadow: none;
  }

  .checkout-box { padding: 13px; }
}

@media (min-width: 861px) and (max-width: 1180px) {
  .attention-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* === CRM27: compact, informative shift briefing === */
.workspace-briefing {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  grid-column: 1;
  margin: 0;
}

.workspace-briefing .desk-notes-panel,
.workspace-briefing .attention-panel {
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #ded8d4;
  border-radius: 10px;
  background: #fff;
}

.workspace-briefing .desk-notes-head,
.workspace-briefing .attention-panel-head {
  min-height: 46px;
  margin: 0;
  padding: 7px 8px 7px 10px;
  border-bottom: 1px solid #eeeae7;
}

.workspace-panel-title { display: flex; align-items: center; min-width: 0; gap: 8px; }
.workspace-panel-title > div { display: grid; min-width: 0; line-height: 1.15; }
.workspace-panel-title strong { overflow: hidden; color: #302c2a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-panel-title small { margin-top: 2px; color: #9a918d; font-size: 9px; font-weight: 700; }
.workspace-panel-mark { width: 7px; height: 28px; flex: 0 0 auto; border-radius: 5px; background: #e7bb55; }
.workspace-panel-mark.attention { background: #27a57a; }
.workspace-count { min-width: 21px; height: 21px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 6px; background: #eeeae7; color: #4f4946; font-size: 10px; }

.workspace-briefing .desk-notes-actions,
.workspace-briefing .attention-panel-head { gap: 6px; }

.workspace-briefing .desk-notes-actions button,
.workspace-briefing .attention-panel-head > button {
  min-height: 27px;
  height: 27px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 10px;
  box-shadow: none;
}

.workspace-briefing .desk-notes-board,
.workspace-briefing .attention-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-height: 144px;
  overflow: auto;
}

.workspace-briefing .desk-note-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 9px 7px 12px;
  border: 0;
  border-bottom: 1px solid #eeeae7;
  border-radius: 0;
  background: #fff;
}

.workspace-briefing .desk-note-card:last-child { border-bottom: 0; }
.workspace-briefing .desk-note-copy { display: -webkit-box; overflow: hidden; margin: 0; color: #302c2a; font-size: 12px; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.workspace-briefing .desk-note-footer { display: flex; align-items: center; gap: 8px; }
.workspace-briefing .desk-note-meta { display: grid; min-width: 86px; color: #756d69; font-size: 9px; line-height: 1.2; text-align: right; }
.workspace-briefing .desk-note-meta span { color: #9a918d; }
.workspace-briefing .desk-note-actions { gap: 3px; opacity: .45; transition: opacity .15s ease; }
.workspace-briefing .desk-note-card:hover .desk-note-actions,
.workspace-briefing .desk-note-card:focus-within .desk-note-actions { opacity: 1; }
.workspace-briefing .desk-note-actions button { min-height: 24px; padding: 0 6px; border-radius: 6px; font-size: 9px; }
.workspace-briefing .desk-note-card.is-editing { grid-template-columns: 1fr; align-items: stretch; }
.workspace-briefing .desk-note-card textarea { min-height: 48px; max-height: 84px; }

.workspace-briefing .attention-board > button {
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 48px;
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 10px;
  border: 0;
  border-bottom: 1px solid #eeeae7;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.workspace-briefing .attention-board > button:last-child { border-bottom: 0; }
.workspace-briefing .attention-board > button:hover { background: #faf8f6; }
.workspace-briefing .attention-board > button > i { width: 7px; height: 7px; border-radius: 50%; background: #e0a35a; }
.workspace-briefing .attention-board > button.danger > i { background: #d95d5d; }
.workspace-briefing .attention-board > button > span { display: grid; min-width: 0; gap: 2px; text-align: left; }
.workspace-briefing .attention-board > button strong { overflow: hidden; color: #302c2a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-briefing .attention-board > button small { overflow: hidden; color: #756d69; font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.workspace-briefing .attention-board > button > b { color: #9a918d; font-size: 18px; font-weight: 500; }

.workspace-briefing .attention-friends-order,
.workspace-briefing .attention-empty {
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid #eeeae7;
  border-radius: 0;
  background: #fff;
  box-shadow: inset 3px 0 #e0a35a;
}

.workspace-briefing .attention-empty { box-shadow: inset 3px 0 #27a57a; }
.workspace-briefing .is-collapsed .desk-notes-head,
.workspace-briefing .attention-panel.is-collapsed .attention-panel-head { border-bottom: 0; }

@media (max-width: 1080px) {
  .workspace-briefing { grid-template-columns: 1fr; }
  .workspace-briefing .desk-notes-board,
  .workspace-briefing .attention-board { max-height: 130px; }
}

@media (max-width: 720px) {
  .workspace-briefing { gap: 7px; }
  .workspace-briefing .desk-note-card { grid-template-columns: 1fr; gap: 5px; }
  .workspace-briefing .desk-note-footer { justify-content: space-between; }
  .workspace-briefing .desk-note-meta { text-align: left; }
}

/* Home attention: concise action queue with a true collapsed state. */
.workspace-briefing .attention-panel {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #ded8d4;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(48, 44, 42, .06);
}

.workspace-briefing .attention-panel-head {
  min-height: 48px;
  margin: 0;
  padding: 0 12px;
}

.workspace-briefing .attention-panel-head .workspace-panel-title { gap: 10px; }
.workspace-briefing .attention-panel-head .workspace-panel-mark.attention {
  width: 6px;
  height: 28px;
  border-radius: 6px;
  background: #ff5c63;
}
.workspace-briefing .attention-panel-head .workspace-panel-title small { display: none; }
.workspace-briefing .attention-panel-head .workspace-panel-title strong { font-size: 14px; }
.workspace-briefing .attention-panel-head .workspace-count {
  min-width: 25px;
  height: 25px;
  border-radius: 9px;
  background: #ffeaeb;
  color: #f0444c;
  font-size: 12px;
}

.attention-toggle {
  min-height: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border: 1px solid #ded8d4;
  border-radius: 9px;
  background: #fff;
  color: #302c2a;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}
.attention-toggle:hover { border-color: #e77f72; background: #fff2f0; }
.attention-toggle i,
.attention-more i {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .16s ease;
}
.attention-toggle.is-expanded i { transform: rotate(225deg) translateY(-2px); }

.workspace-briefing .attention-board {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: none;
  margin: 0;
  border-top: 1px solid #eeeae7;
}
.workspace-briefing .attention-panel.is-collapsed .attention-board { display: none; }
.workspace-briefing .attention-row {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 48px;
  min-height: 48px;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) max-content 16px;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 7px 13px;
  border: 0;
  border-bottom: 1px solid #eeeae7;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  color: #302c2a;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
.workspace-briefing .attention-row::before { display: none; }
.workspace-briefing .attention-row:hover { background: #fff2f0; border-color: #eeeae7; }
.workspace-briefing .attention-row > i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f4b740;
}
.workspace-briefing .attention-row.danger > i { background: #ff3340; }
.workspace-briefing .attention-row.ok > i { background: #19a879; }
.attention-row-copy { min-width: 0; display: grid; gap: 2px; overflow: hidden; }
.workspace-briefing .attention-row strong { overflow: hidden; color: #302c2a; font-size: 12px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.workspace-briefing .attention-row small { overflow: hidden; color: #9a918d; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.workspace-briefing .attention-row em {
  justify-self: end;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff3e8;
  color: #c77932;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}
.workspace-briefing .attention-row.danger em { background: #ffebed; color: #f04c54; }
.workspace-briefing .attention-row > b { color: #756d69; font-size: 22px; font-weight: 400; line-height: 1; }
.workspace-briefing .attention-friends-order { width: 100%; max-width: none; min-width: 0; }
.workspace-briefing .attention-more {
  width: auto;
  max-width: none;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 10px;
  padding: 0 13px;
  border: 0;
  background: #fff;
  color: #9e3f34;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}
.attention-more i { transform: rotate(45deg) translate(-2px, -2px); }

.workspace-briefing .attention-panel.is-collapsed .attention-panel-head {
  min-height: 42px;
}
.workspace-briefing .attention-panel.is-collapsed .workspace-panel-mark.attention {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.workspace-briefing .attention-panel.is-collapsed .attention-toggle {
  border-color: transparent;
  background: transparent;
}

.home-checkout > .desk-notes-panel {
  box-sizing: border-box;
  width: 100%;
  margin-top: 12px;
  overflow: visible;
}

.home-checkout > .desk-notes-panel .desk-notes-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.home-checkout > .desk-notes-panel .workspace-panel-title {
  width: 100%;
}

.home-checkout > .desk-notes-panel .desk-notes-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
}

.home-checkout > .desk-notes-panel .desk-notes-actions button {
  width: 100%;
  height: 32px;
  min-height: 32px;
  min-width: 0;
  margin: 0;
  padding: 0 8px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.home-checkout > .desk-notes-panel .desk-notes-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-height: none;
  overflow: visible;
}

.home-checkout > .desk-notes-panel .desk-note-card {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
}

.home-checkout > .desk-notes-panel .desk-note-copy {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  color: #302c2a;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: normal;
  white-space: pre-wrap;
}

.home-checkout > .desk-notes-panel .desk-note-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  width: 100%;
  min-width: 0;
}

.home-checkout > .desk-notes-panel .desk-note-meta {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  color: #8a7a55;
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-checkout > .desk-notes-panel .desk-note-meta span {
  display: block;
  width: 100%;
  overflow: hidden;
  color: #9a8b6a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-checkout > .desk-notes-panel .desk-note-card.is-editing {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.home-checkout > .desk-notes-panel .desk-note-card.is-editing textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 52px;
  max-height: 72px;
}

.home-checkout > .desk-notes-panel .desk-note-card.is-editing .desk-note-meta {
  display: none;
}

.home-checkout > .desk-notes-panel .desk-note-card.is-editing .desk-note-footer {
  display: grid;
  min-width: 0;
}

.home-checkout > .desk-notes-panel .desk-note-actions {
  display: flex;
  width: 100%;
  flex-wrap: nowrap;
  gap: 5px;
}

.home-checkout > .desk-notes-panel .desk-note-actions button {
  flex: 1 1 0;
  height: 32px;
  min-height: 32px;
  min-width: 0;
  margin: 0;
  padding: 0 8px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

/* Home workspace alignment and existing CRM color tokens. */
.topbar .profile .js-logout {
  box-sizing: border-box;
  width: auto;
  height: 26px;
  min-height: 26px;
  margin: 0;
  padding: 0 9px;
  border-color: #eda89f;
  background: var(--cyan-soft);
  color: #9e3f34;
  line-height: 1;
}

.workspace-briefing {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 0 0 8px;
}

.workspace-briefing .attention-panel {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.attention-toggle,
.home-checkout > .desk-notes-panel .js-desk-notes-toggle,
.home-checkout > .desk-notes-panel .js-desk-note-edit,
.home-checkout > .desk-notes-panel .js-desk-note-cancel {
  border-color: #eda89f;
  background: var(--cyan-soft);
  color: #9e3f34;
}

.home-checkout > .desk-notes-panel .js-desk-note-add {
  border-color: var(--cyan);
  background: var(--cyan);
  color: #fff;
}

.home-checkout > .desk-notes-panel .js-desk-note-save {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.home-checkout > .desk-notes-panel .js-desk-note-delete {
  border-color: #f0c2bc;
  background: #fff5f4;
  color: #b42318;
}

@media (max-width: 760px) {
  .home-desk,
  .workspace-briefing,
  .workspace-briefing .attention-panel,
  .home-checkout,
  .home-checkout > .desk-notes-panel {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .workspace-briefing .attention-panel-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    width: 100%;
    min-width: 0;
    padding: 0 9px;
  }

  .workspace-briefing .attention-panel-head .workspace-panel-title {
    min-width: 0;
    gap: 7px;
  }

  .workspace-briefing .attention-panel-head .workspace-panel-title strong {
    display: block;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .workspace-briefing .attention-toggle {
    box-sizing: border-box;
    max-width: 108px;
    height: 30px;
    min-height: 30px;
    margin: 0;
    padding: 0 7px;
    gap: 6px;
    white-space: nowrap;
  }

  .workspace-briefing .attention-board,
  .workspace-briefing .attention-row,
  .workspace-briefing .attention-friends-order,
  .workspace-briefing .attention-empty {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .workspace-briefing .attention-row {
    height: auto;
    min-height: 52px;
    grid-template-columns: 10px minmax(0, 1fr) 12px;
    gap: 7px;
    padding: 7px 9px;
  }

  .workspace-briefing .attention-row em {
    display: none;
  }

  .home-checkout > .desk-notes-panel {
    padding: 9px;
    overflow: hidden;
  }

  .home-checkout > .desk-notes-panel .desk-notes-head,
  .home-checkout > .desk-notes-panel .desk-notes-actions,
  .home-checkout > .desk-notes-panel .desk-notes-board,
  .home-checkout > .desk-notes-panel .desk-note-card,
  .home-checkout > .desk-notes-panel .desk-note-footer,
  .home-checkout > .desk-notes-panel .desk-note-actions {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .home-checkout > .desk-notes-panel .desk-notes-actions,
  .home-checkout > .desk-notes-panel .desk-note-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .home-checkout > .desk-notes-panel .desk-notes-actions button,
  .home-checkout > .desk-notes-panel .desk-note-actions button {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 720px) {
  .workspace-briefing .attention-panel-head { padding: 0 10px; }
  .workspace-briefing .attention-row { grid-template-columns: 12px minmax(0, 1fr) max-content 12px; gap: 7px; padding: 7px 10px; }
  .workspace-briefing .attention-row em { padding: 4px 7px; }
}

@media (max-width: 760px) {
  .workspace-briefing .attention-panel-head { padding: 0 9px; }
  .workspace-briefing .attention-row {
    grid-template-columns: 10px minmax(0, 1fr) 12px;
    gap: 7px;
    padding: 7px 9px;
  }
  .workspace-briefing .attention-row em { display: none; }
}

.home-checkout > .desk-notes-panel.is-collapsed .desk-notes-board {
  display: none;
}

/* Manager analytics */
#analytics { min-height: 100%; background: #faf8f6; }
.analytics-layout { display: grid; gap: 16px; max-width: 1480px; margin: 0 auto; padding: 22px; }
.analytics-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; padding: 20px 22px; border: 1px solid #eeeae7; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(48, 44, 42, .05); }
.analytics-head p, .analytics-head h2, .analytics-head span, .analytics-panel-head h3, .analytics-panel-head p, .analytics-filter-row h3, .analytics-filter-row p { margin: 0; }
.analytics-head p { color: #9e3f34; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.analytics-head h2 { margin-top: 3px; color: #302c2a; font-size: 28px; }
.analytics-head > div > span { display: block; margin-top: 5px; color: #756d69; font-size: 13px; }
.analytics-toolbar { display: grid; grid-template-columns: 155px minmax(150px, auto); gap: 8px; }
.analytics-toolbar input, .analytics-toolbar button { width: 100%; height: 42px; min-height: 42px; margin: 0; }
.analytics-toolbar input, .analytics-plan-form input { padding: 0 11px; border: 1px solid #ded8d4; border-radius: 9px; background: #fff; color: #302c2a; font: inherit; }
.analytics-month-picker { position: relative; min-width: 155px; }
.analytics-month-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 11px; border: 1px solid #ded8d4; border-radius: 9px; background: #fff; color: #302c2a; font: inherit; font-weight: 750; cursor: pointer; white-space: nowrap; }
.analytics-month-toggle:hover, .analytics-month-toggle:focus-visible, .analytics-month-toggle[aria-expanded="true"] { border-color: #e77f72; box-shadow: 0 0 0 3px rgba(158, 63, 52, .09); outline: 0; }
.analytics-month-icon { flex: 0 0 auto; color: #9e3f34; font-size: 17px; line-height: 1; }
.analytics-month-popover { position: absolute; z-index: 40; top: calc(100% + 8px); right: 0; width: 310px; padding: 12px; border: 1px solid #ded8d4; border-radius: 13px; background: #fff; box-shadow: 0 18px 44px rgba(48, 44, 42, .16); }
.analytics-month-popover[hidden] { display: none !important; }
.analytics-month-year-nav { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: center; gap: 8px; margin-bottom: 10px; }
.analytics-month-year-nav strong { text-align: center; color: #302c2a; font-size: 15px; }
.analytics-toolbar .analytics-month-year-nav button { width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 0; border: 1px solid #ded8d4; border-radius: 9px; background: #faf8f6; color: #302c2a; font-size: 21px; cursor: pointer; }
.analytics-month-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.analytics-toolbar .analytics-month-grid button { width: 100%; min-width: 0; height: 36px; min-height: 36px; padding: 0 7px; border: 1px solid #eeeae7; border-radius: 8px; background: #fff; color: #4f4946; font-size: 11px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.analytics-toolbar .analytics-month-grid button:hover, .analytics-toolbar .analytics-month-grid button:focus-visible { border-color: #e77f72; background: #fff8f6; outline: 0; }
.analytics-toolbar .analytics-month-grid button.active { border-color: #e77f72; background: #f5d0cb; color: #9e3f34; }
.analytics-tabs { display: flex; gap: 5px; padding: 5px; overflow-x: auto; border: 1px solid #eeeae7; border-radius: 12px; background: #fff; }
.analytics-tabs button, .analytics-segments button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: #756d69; font-weight: 800; white-space: nowrap; }
.analytics-tabs button.active, .analytics-segments button.active { background: #f5d0cb; color: #9e3f34; }
.analytics-body { display: grid; gap: 16px; }
.analytics-kpis, .analytics-plan-grid, .analytics-quality-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.analytics-kpis-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.analytics-kpis article, .analytics-plan-card, .analytics-quality-card, .analytics-panel, .analytics-quality-summary { border: 1px solid #eeeae7; border-radius: 14px; background: #fff; box-shadow: 0 5px 16px rgba(48, 44, 42, .035); }
.analytics-kpis article, .analytics-plan-card { display: grid; gap: 4px; padding: 16px; }
.analytics-kpi-button, .analytics-retention-button { display: grid; gap: 4px; width: 100%; min-width: 0; padding: 16px; border: 1px solid #eeeae7; border-radius: 14px; background: #fff; box-shadow: 0 5px 16px rgba(48, 44, 42, .035); color: inherit; text-align: left; }
.analytics-kpi-button { cursor: pointer; }
.analytics-kpi-button:hover, .analytics-kpi-button:focus-visible { border-color: #9e3f34; background: #fff2f0; box-shadow: 0 0 0 3px rgba(158, 63, 52, .12); outline: 0; }
.analytics-kpi-button span, .analytics-kpi-button small, .analytics-retention-button span, .analytics-retention-button small { color: #756d69; font-size: 12px; font-weight: 800; }
.analytics-kpi-button strong, .analytics-retention-button strong { color: #302c2a; font-size: 25px; line-height: 1.15; }
.analytics-retention-button { grid-template-columns: minmax(0,1fr) auto; align-items: center; margin-top: 14px; border-color: #b8e3d4; background: linear-gradient(105deg, #f3fcf8, #fff); }
.analytics-retention-button span, .analytics-retention-button small { grid-column: 1; }
.analytics-retention-button strong { grid-column: 2; grid-row: 1 / span 2; color: #08754c; font-size: 31px; }
.analytics-retention-button:hover, .analytics-retention-button:focus-visible { border-color: #9e3f34; outline: 3px solid rgba(158, 63, 52, .12); outline-offset: 0; }
.analytics-detail-modal-card { width: min(920px, calc(100vw - 32px)); max-height: min(780px, calc(100vh - 32px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 16px; }
.analytics-detail-modal-card .report-modal-head > div > span { display: block; max-width: 650px; margin-top: 4px; color: #756d69; font-size: 12px; line-height: 1.4; }
.analytics-detail-modal-body { min-height: 0; overflow: auto; }
.analytics-detail-table { display: grid; overflow: hidden; border: 1px solid #eeeae7; border-radius: 11px; }
.analytics-detail-head, .analytics-detail-row { display: grid; grid-template-columns: minmax(180px, 1.5fr) minmax(130px, 1fr) 110px 90px; gap: 12px; align-items: center; padding: 11px 13px; text-align: left; }
.analytics-detail-head { background: #faf8f6; color: #756d69; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.analytics-detail-row { width: 100%; border: 0; border-top: 1px solid #eeeae7; background: #fff; color: #4f4946; cursor: pointer; }
.analytics-detail-row:hover, .analytics-detail-row:focus-visible { background: #fff2f0; outline: 0; }
.analytics-detail-row > span:first-child { display: grid; gap: 2px; min-width: 0; }
.analytics-detail-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #302c2a; }
.analytics-detail-row small { color: #756d69; font-size: 11px; }
.analytics-detail-row > b { color: #302c2a; white-space: nowrap; text-align: right; }
.analytics-retention-summary { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 3px 16px; align-items: center; margin-bottom: 16px; padding: 18px; border: 1px solid #b8e3d4; border-radius: 12px; background: #f3fcf8; }
.analytics-retention-summary strong { grid-row: 1 / span 2; color: #08754c; font-size: 36px; }
.analytics-retention-summary span { color: #302c2a; font-weight: 800; }
.analytics-retention-summary small { color: #756d69; }
.analytics-detail-modal-body h3 { margin: 0 0 8px; color: #302c2a; font-size: 14px; }
.analytics-kpis span, .analytics-plan-card > span { color: #756d69; font-size: 12px; font-weight: 800; }
.analytics-kpis strong, .analytics-plan-card strong { color: #302c2a; font-size: 25px; line-height: 1.15; }
.analytics-kpis small, .analytics-plan-card small, .analytics-quality-card small, .analytics-update-note { color: #756d69; font-size: 11px; }
.analytics-grid-2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.analytics-panel { min-width: 0; padding: 17px; }
.analytics-panel-head, .analytics-filter-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 14px; }
.analytics-panel-head h3, .analytics-filter-row h3 { color: #302c2a; font-size: 16px; }
.analytics-panel-head p, .analytics-filter-row p { margin-top: 3px; color: #756d69; font-size: 12px; }
.analytics-bars { display: flex; gap: 5px; align-items: flex-end; min-height: 190px; padding-top: 12px; overflow-x: auto; }
.analytics-bar-item { display: grid; grid-template-rows: 18px 140px 20px; gap: 4px; flex: 1 0 22px; min-width: 22px; text-align: center; }
.analytics-bar-item b, .analytics-bar-item span { overflow: hidden; color: #756d69; font-size: 10px; text-overflow: ellipsis; }
.analytics-bar-item > div { display: flex; align-items: flex-end; justify-content: center; overflow: hidden; border-radius: 6px 6px 3px 3px; background: #eeeae7; }
.analytics-bar-item i { display: block; width: 100%; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg,#f05342,#9e3f34); }
.analytics-filter-row { margin: 0; padding: 16px 18px; border: 1px solid #eeeae7; border-radius: 14px; background: #fff; }
.analytics-segments { display: flex; padding: 3px; overflow-x: auto; border-radius: 9px; background: #eeeae7; }
.analytics-table { display: grid; overflow: hidden; border: 1px solid #eeeae7; border-radius: 11px; }
.analytics-table-head, .analytics-table-row { display: grid; grid-template-columns: 1.4fr .9fr .8fr .65fr; gap: 12px; align-items: center; min-width: 0; padding: 11px 13px; text-align: left; }
.analytics-table-head { background: #faf8f6; color: #756d69; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.analytics-table-row { width: 100%; border: 0; border-top: 1px solid #eeeae7; border-radius: 0; background: #fff; color: #4f4946; }
button.analytics-table-row:hover, .analytics-quality-row:hover { background: #fff2f0; }
.analytics-table-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analytics-risk-table { overflow-x: auto; }
.analytics-risk-table .analytics-table-head, .analytics-risk-row { grid-template-columns: minmax(170px,1.25fr) minmax(125px,.85fr) 112px 108px minmax(180px,1fr) 96px; min-width: 900px; }
.analytics-risk-client { min-width: 0; padding: 0; border: 0; background: transparent; color: #302c2a; text-align: left; }
.analytics-risk-client strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analytics-risk-client:hover, .analytics-risk-client:focus-visible { color: #9e3f34; outline: 0; text-decoration: underline; }
.analytics-risk-offer { display: inline-flex; gap: 9px; align-items: center; min-width: 0; color: #4f4946; font-size: 12px; font-weight: 750; cursor: pointer; }
.analytics-risk-offer input { appearance: none; flex: 0 0 18px; width: 18px; height: 18px; min-height: 18px; margin: 0; padding: 0; border: 1px solid #cfc5c0; border-radius: 5px; background: #fff center / 12px 12px no-repeat; box-sizing: border-box; cursor: pointer; }
.analytics-risk-offer input:checked { border-color: #9e3f34; background-color: #9e3f34; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='m3.2 8.1 3 3 6.6-7'/%3E%3C/svg%3E"); }
.analytics-risk-offer input:focus-visible { outline: 2px solid rgba(158,63,52,.3); outline-offset: 2px; }
.analytics-risk-offer input:disabled { cursor: wait; opacity: .6; }
.analytics-risk-offer span { overflow: visible; white-space: normal; }
.analytics-risk-offer-date { color: #756d69; }
.analytics-risk { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #eeeae7; color: #756d69; font-size: 11px; }
.analytics-risk.medium { background: #fff2d6; color: #9a6410; }
.analytics-risk.high { background: #fde6e4; color: #b24236; }
.analytics-pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 16px; }
.analytics-pagination > div { display: flex; align-items: center; gap: 6px; }
.analytics-pagination button { min-width: 38px; min-height: 38px; padding: 8px 11px; border: 1px solid #d9d0cc; border-radius: 9px; background: #fff; color: #4f4946; font-weight: 800; cursor: pointer; }
.analytics-pagination button:hover, .analytics-pagination button:focus-visible { border-color: #9e3f34; color: #9e3f34; outline: 2px solid rgba(158,63,52,.12); outline-offset: 1px; }
.analytics-pagination button.active { border-color: #9e3f34; background: #9e3f34; color: #fff; }
.analytics-pagination button:disabled { cursor: default; opacity: .45; }
.analytics-pagination span { min-width: 20px; color: #756d69; text-align: center; }
.analytics-pagination-edge { min-width: 82px !important; }
.analytics-progress { height: 7px; margin-top: 7px; overflow: hidden; border-radius: 999px; background: #eeeae7; }
.analytics-progress i { display: block; height: 100%; border-radius: inherit; background: #9e3f34; }
.analytics-plan-form { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)) auto; gap: 10px; align-items: end; }
.analytics-plan-form label { display: grid; gap: 6px; color: #756d69; font-size: 12px; font-weight: 800; }
.analytics-plan-form input, .analytics-plan-form button { width: 100%; min-height: 42px; }
.analytics-update-note { margin: 10px 0 0; }
.analytics-quality-summary { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 18px; }
.analytics-quality-summary > div { display: grid; gap: 3px; }
.analytics-quality-summary span, .analytics-quality-summary p { margin: 0; color: #756d69; font-size: 12px; }
.analytics-quality-summary strong { color: #302c2a; font-size: 22px; }
.analytics-quality-summary.warn { border-color: #f0c5bd; background: #fff9f8; }
.analytics-quality-summary.ok { border-color: #bfe5d1; background: #f5fcf8; }
.analytics-quality-card { display: grid; gap: 5px; min-height: 126px; padding: 15px; text-align: left; }
.analytics-quality-card span { color: #4f4946; font-weight: 800; }
.analytics-quality-card strong { color: #302c2a; font-size: 25px; }
.analytics-quality-card.warn strong { color: #bd493d; }
.analytics-quality-card.active { border-color: #9e3f34; background: #fff2f0; box-shadow: 0 0 0 2px rgba(158, 63, 52, .12); }
.analytics-quality-list { display: grid; max-height: 520px; overflow: auto; border: 1px solid #eeeae7; border-radius: 10px; }
.analytics-quality-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center; width: 100%; min-height: 54px; padding: 10px 12px; border: 0; border-bottom: 1px solid #eeeae7; border-radius: 0; background: #fff; color: #4f4946; text-align: left; }
.analytics-quality-row > span { display: grid; gap: 2px; min-width: 0; }
.analytics-quality-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analytics-quality-row small { color: #756d69; font-size: 10px; }
.analytics-quality-row > b { color: #756d69; font-size: 12px; text-align: right; }
.analytics-empty { padding: 32px 18px; color: #756d69; text-align: center; }
.honor-intro { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 24px; border: 1px solid #eda89f; border-radius: 16px; background: linear-gradient(115deg, #fff2f0, #f8fffd 58%, #fff8e6); box-shadow: 0 7px 18px rgba(158, 63, 52, .07); }
.honor-intro p, .honor-intro h3, .honor-intro span, .honor-group-head h3, .honor-group-head span, .honor-card h4 { margin: 0; }
.honor-intro p, .honor-group-head > span { color: #9e3f34; font-size: 11px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.honor-intro h3 { margin-top: 4px; color: #302c2a; font-size: 25px; }
.honor-intro span { display: block; max-width: 680px; margin-top: 6px; color: #756d69; font-size: 13px; line-height: 1.45; }
.honor-intro-mark { display: grid; flex: 0 0 58px; width: 58px; height: 58px; place-items: center; border-radius: 18px; background: #fff; box-shadow: 0 6px 16px rgba(127,91,16,.13); color: #d69418; font-size: 30px; }
.honor-groups { display: grid; gap: 24px; }
.honor-group { display: grid; gap: 12px; }
.honor-group-head { display: grid; gap: 3px; padding: 0 3px; }
.honor-group-head h3 { color: #302c2a; font-size: 18px; }
.honor-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.honor-grid-clients { grid-template-columns: repeat(2,minmax(0,1fr)); }
.honor-card { min-width: 0; overflow: hidden; border: 1px solid #eeeae7; border-radius: 14px; background: #fff; box-shadow: 0 5px 16px rgba(48, 44, 42, .035); }
.honor-card h4 { padding: 15px 16px 12px; border-bottom: 1px solid #eeeae7; color: #302c2a; font-size: 14px; }
.honor-list { display: grid; margin: 0; padding: 0; list-style: none; }
.honor-list li { display: grid; grid-template-columns: 29px minmax(0,1fr) auto; gap: 10px; align-items: center; min-height: 56px; padding: 10px 14px; border-bottom: 1px solid #eeeae7; }
.honor-list li:last-child { border-bottom: 0; }
.honor-list li.honor-client { width: 100%; border: 0; border-bottom: 1px solid #eeeae7; background: #fff; color: inherit; text-align: left; cursor: pointer; }
.honor-list li.honor-client:hover, .honor-list li.honor-client:focus-visible { background: #fff2f0; outline: 0; }
.honor-place { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 8px; background: #eeeae7; color: #756d69; font-size: 12px; }
.honor-list li:nth-child(1) .honor-place { background: #fff1c9; color: #9b6810; }
.honor-list li:nth-child(2) .honor-place { background: #eeeae7; color: #756d69; }
.honor-list li:nth-child(3) .honor-place { background: #fce9dc; color: #a45a28; }
.honor-list li > span { display: grid; min-width: 0; gap: 2px; }
.honor-list strong { overflow: hidden; color: #302c2a; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.honor-list small { overflow: hidden; color: #756d69; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.honor-list em { display: grid; justify-items: end; color: #9e3f34; font-size: 13px; font-style: normal; font-weight: 850; white-space: nowrap; }
.honor-list em small { color: #756d69; font-size: 10px; font-weight: 700; }

@media (max-width: 1180px) {
  .analytics-kpis, .analytics-plan-grid, .analytics-quality-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .analytics-plan-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .analytics-plan-form button { grid-column: 1/-1; }
}

@media (max-width: 760px) {
  .analytics-layout { padding: 12px; }
  .analytics-head, .analytics-filter-row, .analytics-quality-summary { align-items: stretch; flex-direction: column; }
  .analytics-toolbar { grid-template-columns: 1fr 1fr; }
  .analytics-month-popover { right: auto; left: 0; width: min(310px, calc(100vw - 48px)); }
  .analytics-kpis, .analytics-kpis-3, .analytics-plan-grid, .analytics-quality-grid, .analytics-grid-2, .analytics-plan-form { grid-template-columns: 1fr; }
  .analytics-table-head { display: none; }
  .analytics-table-row { grid-template-columns: 1fr auto; }
  .analytics-table-row span:nth-child(2), .analytics-table-row span:nth-child(3) { grid-column: 1/-1; }
  .analytics-quality-row { grid-template-columns: 1fr; }
  .analytics-quality-row > b { text-align: left; }
  .analytics-retention-button { grid-template-columns: 1fr; }
  .analytics-retention-button strong { grid-column: 1; grid-row: auto; }
  .analytics-detail-modal-card { width: min(100vw - 20px, 920px); max-height: calc(100vh - 20px); padding: 16px; }
  .analytics-detail-head { display: none; }
  .analytics-detail-row { grid-template-columns: 1fr auto; gap: 5px 12px; }
  .analytics-detail-row > span:nth-child(2), .analytics-detail-row > span:nth-child(3) { grid-column: 1 / -1; color: #756d69; font-size: 12px; }
  .analytics-detail-row > b { grid-column: 2; grid-row: 1; }
  .analytics-retention-summary { grid-template-columns: 1fr; gap: 4px; }
  .analytics-retention-summary strong { grid-row: auto; }
  .honor-intro { align-items: flex-start; }
  .honor-grid, .honor-grid-clients { grid-template-columns: 1fr; }
  .analytics-pagination { flex-wrap: wrap; gap: 8px; }
  .analytics-pagination > div { order: -1; flex: 0 0 100%; justify-content: center; }
  .analytics-pagination-edge { flex: 1 1 110px; }
}

@media (max-width: 900px) {
  .analytics-risk-table { overflow: hidden; }
  .analytics-risk-table .analytics-table-head { display: none; }
  .analytics-risk-row { grid-template-columns: minmax(0,1fr) auto; gap: 9px 14px; min-width: 0; padding: 15px; }
  .analytics-risk-client { grid-column: 1 / -1; padding-bottom: 4px; font-size: 14px; }
  .analytics-risk-row > span { display: grid; grid-template-columns: minmax(96px,auto) minmax(0,1fr); gap: 9px; grid-column: 1 / -1; font-size: 12px; white-space: nowrap; }
  .analytics-risk-row > span::before { content: attr(data-label); color: #756d69; font-size: 11px; font-weight: 800; text-transform: uppercase; }
  .analytics-risk-offer { grid-column: 1; margin-top: 3px; }
  .analytics-risk-offer-date { grid-column: 1 / -1; }
}
