.switch {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 40px;
  height: 20px;
  padding: 2px;
  border: 0;
  border-radius: 999px;
  background: #4b4b4b;
  cursor: pointer;
}

.switch span {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--white);
  transition: transform 120ms ease;
}

.switch.is-on {
  background: #48e6cf;
}

.switch.is-on span {
  transform: translateX(20px);
}

.list-page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  height: 100%;
  min-height: 0;
}

.list-toolbar {
  display: grid;
  grid-template-columns: auto minmax(260px, 340px) auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.list-toolbar h1 {
  margin: 0;
  color: var(--dark4txt);
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 500;
  line-height: 26px;
}

.list-toolbar h1 span {
  font-family: var(--font-body);
  font-size: 14px;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  height: 42px;
  padding: 0 12px 0 16px;
  border-radius: var(--radius-sm);
  background: var(--white);
}

.search-box input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--grey4txt);
  background: transparent;
  font: inherit;
}

.search-box img {
  width: 24px;
  height: 24px;
}

.detail-button img {
  width: 16px;
  height: 16px;
}

.client-stats {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  color: var(--grey4txt);
  white-space: nowrap;
}

.client-stats strong {
  font-weight: 800;
}

.client-stats .pink {
  color: var(--accent-pink);
}

.client-table {
  display: grid;
  grid-auto-rows: 46px;
  gap: 2px;
  overflow: hidden auto;
}

.client-table-head,
.client-row {
  display: grid;
  grid-template-columns: 80px 1.45fr 1.55fr 1.4fr 1.45fr 128px 136px 78px 42px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.client-table-head {
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  color: var(--dark4txt);
  background: var(--white);
  font-weight: 700;
}

.client-row {
  padding: 0 16px;
  border-radius: var(--radius-sm);
  color: var(--grey4txt);
  background: rgba(255, 255, 255, 0.6);
}

.client-row.is-alt {
  background: rgba(255, 255, 255, 0.3);
}

.client-row:hover {
  background: var(--white);
}

.client-row > span,
.client-table-head > span {
  padding: 0 8px;
}

.client-row > span,
.client-table-head > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tiny-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 10px;
  border: 2px solid var(--white);
  border-radius: 999px;
  background: var(--accent-pink);
  vertical-align: middle;
}

.tiny-dot.green {
  background: var(--accent-green);
}

.table-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.table-icon img {
  width: 22px;
  height: 22px;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 5, 34, 0.38);
}

.client-modal {
  position: relative;
  width: 800px;
  height: min(852px, calc(100vh - 48px));
  padding: 28px 40px 24px;
  overflow: hidden;
  border-radius: 16px;
  color: var(--dark4txt);
  background: var(--dark4txt) url("../../assets/images/app-bg.png") center / cover no-repeat;
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.55);
}

.modal-title-block {
  color: var(--white);
}

.modal-title-block span,
.modal-title-block strong {
  display: block;
}

.modal-title-block strong {
  font-family: var(--font-heading);
  font-size: 26px;
  line-height: 30px;
}

.modal-close {
  position: absolute;
  top: 40px;
  right: 32px;
  background: rgba(255, 255, 255, 0.24);
}

.client-accordions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: calc(100% - 70px);
  margin-top: 26px;
  overflow-x: hidden;
}

.client-accordion {
  flex: 0 0 auto;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.accordion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: 0 24px;
  border: 0;
  color: var(--dark4txt);
  background: transparent;
  font-family: var(--font-heading);
  font-size: 20px;
  line-height: 24px;
  cursor: pointer;
}

.accordion-head img {
  width: 18px;
  height: 18px;
}

.accordion-body {
  display: none;
  padding: 0 24px 16px;
}

.client-accordion.is-open .accordion-body {
  display: block;
}

.empty-tab {
  min-height: 120px;
  padding-top: 16px;
  color: var(--grey4txt);
}

.info-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px 16px;
  color: var(--grey4txt);
}

.field,
.select-row {
  display: grid;
  gap: 6px;
}

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

.field input,
.field select,
.select-row select,
.device-panel select,
.device-panel input {
  width: 100%;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: var(--grey4txt);
  background: var(--white);
  font: inherit;
  outline: 0;
}

.input-with-icon {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  height: 46px;
  padding: 0 12px 0 0;
  border-radius: 8px;
  background: var(--white);
}

.input-with-icon input {
  height: 46px;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--grey4txt);
}

.check-field input {
  appearance: none;
  width: 24px;
  height: 24px;
  margin: 0;
  border-radius: 7px;
  background: var(--white);
}

.check-field input:checked::after {
  content: "✓";
  display: block;
  color: var(--grey4txt);
  font-size: 18px;
  line-height: 24px;
  text-align: center;
}

.form-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.5);
}

.stepper-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
}

.stepper {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  height: 42px;
  border-radius: 8px;
  background: var(--white);
  text-align: center;
}

.stepper button {
  width: 30px;
  height: 30px;
  margin: 0 6px;
  border: 0;
  border-radius: 999px;
  background: #e0e0e0;
  font-size: 24px;
  line-height: 24px;
  cursor: pointer;
}

.history-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.history-line a {
  color: #224c9a;
}

.select-row {
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: center;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
}

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

.device-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.device-panel {
  padding: 12px 16px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.device-panel h3 {
  margin: 0 0 12px;
  color: var(--grey4txt);
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 500;
}

.device-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 8px -16px;
}

.date-cell {
  position: relative;
  min-height: 44px;
  padding: 5px 34px 5px 16px;
  border-top: 1px solid rgba(3, 5, 34, 0.1);
  border-right: 1px solid rgba(3, 5, 34, 0.12);
}

.date-cell span,
.date-cell strong {
  display: block;
  line-height: 17px;
}

.date-cell img {
  position: absolute;
  top: 14px;
  right: 10px;
  width: 18px;
  height: 18px;
}

.two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.siptv-actions {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 8px;
  align-items: center;
}
