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

body {
  min-width: 320px;
}

img {
  max-width: 100%;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(160, 0, 152, .28);
  outline-offset: 2px;
}

.edit-save-status {
  min-height: 22px;
  margin-top: 12px;
  color: #6c6f82;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.edit-save-status.error {
  padding: 10px 12px;
  border: 1px solid #fecdd3;
  border-radius: 6px;
  background: #fff1f2;
  color: #be123c;
  text-align: left;
}

[data-edit-submit][aria-busy="true"] {
  cursor: wait;
}

.mobile-menu-toggle,
.nav-backdrop,
.mobile-stage-move {
  display: none;
}

.side > .brand-logo {
  flex: 0 0 94px !important;
  height: 94px !important;
  min-height: 94px !important;
  padding: 8px 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden;
}

.side > .brand-logo img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.side > .nav {
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  grid-auto-rows: max-content;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.side > .nav > button,
.admin-submenu > button {
  height: 48px;
  min-height: 48px;
  max-height: 48px;
}

.admin-submenu {
  align-content: start;
  grid-auto-rows: 48px;
}

.side > .logout-bottom {
  flex: 0 0 auto;
}

.app.collapsed .side > .brand-logo {
  flex-basis: 72px !important;
  width: 72px !important;
  height: 72px !important;
  min-height: 72px !important;
  padding: 0 !important;
}

.login-version {
  grid-column: 1 / -1;
  color: #6c6f82;
  font-size: 12px;
  text-align: center;
}

.greeting-dialog {
  position: relative;
  width: min(520px, 100%);
  padding: 32px;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(20, 20, 42, .2);
  text-align: center;
}

.greeting-dialog .greeting-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f7e7f7;
  color: #7b007b;
  font-size: 12px;
  font-weight: 900;
}

.greeting-dialog h2 {
  margin: 18px 0 10px;
  color: #211f3d;
  font-size: 28px;
  line-height: 1.2;
  text-wrap: balance;
}

.greeting-dialog p {
  max-width: 42ch;
  margin: 0 auto;
  color: #55596f;
  font-size: 17px;
  line-height: 1.55;
  text-wrap: pretty;
}

.greeting-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 1px solid #e7e8f1;
  background: #fff;
  color: #211f3d;
  font-size: 22px;
}

.greeting-action {
  width: 100%;
  min-height: 48px;
  margin-top: 26px;
}

.password-choice-dialog {
  width: min(560px, 100%);
  padding: 32px;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(20, 20, 42, .2);
  text-align: center;
}

.password-choice-dialog .greeting-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f7e7f7;
  color: #7b007b;
  font-size: 12px;
  font-weight: 900;
}

.password-choice-dialog h2 {
  margin: 18px 0 10px;
  color: #211f3d;
  font-size: 28px;
  line-height: 1.2;
}

.password-choice-dialog > p {
  max-width: 48ch;
  margin: 0 auto;
  color: #55596f;
  font-size: 16px;
  line-height: 1.55;
}

.password-choice-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
  text-align: left;
}

.password-choice-error {
  display: none;
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  background: #fff1f2;
  color: #be123c;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.password-choice-error:not(:empty) {
  display: block;
}

.password-choice-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.password-choice-actions > * {
  width: 100%;
  min-height: 48px;
}

.app,
.main,
.grid,
.panel,
.report-item > div {
  min-width: 0;
}

.main > * {
  max-width: 100%;
}

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

.grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
}

.report-item .meta {
  white-space: normal;
  overflow-wrap: anywhere;
}

.side-credit {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: rgba(255, 255, 255, .66);
  font-size: 9px;
  line-height: 1.2;
  white-space: nowrap;
}

.side-credit img {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.side-credit span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-credit a {
  color: #f0a13a;
  font-weight: 900;
}

.app.collapsed .side-credit {
  display: none;
}

.bell-symbol {
  position: relative;
  display: inline-block;
  flex: 0 0 18px;
  width: 18px;
  height: 19px;
  color: currentColor;
}

.bell-symbol::before {
  position: absolute;
  top: 1px;
  left: 2px;
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border: 2px solid currentColor;
  border-radius: 8px 8px 4px 4px;
  content: "";
}

.bell-symbol::after {
  position: absolute;
  bottom: 0;
  left: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.top-bell {
  align-items: center;
  justify-content: center;
}

.kanban-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
}

.kanban-toolbar .hint {
  margin: 0;
}

.kanban-export {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.kanban-export:hover {
  border-color: #b000a7;
  color: #7b007b;
}

.kanban .col > header {
  gap: 10px;
  align-items: center;
}

.kanban .col > header h2 {
  min-width: 0;
  margin-right: auto;
}

.kanban-column-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.kanban-count {
  flex: 0 0 auto;
  min-width: 26px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.kanban-filter-toggle {
  position: relative;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid #dfe1ea;
  border-radius: 7px;
  background: #fff;
  color: #55596f;
}

.kanban-filter-toggle:hover,
.kanban-filter-toggle.active {
  border-color: #b000a7;
  background: #f7e7f7;
  color: #7b007b;
}

.kanban-filter-symbol {
  display: block;
  width: 16px;
  height: 14px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 62% 46%, 62% 100%, 38% 82%, 38% 46%);
}

.kanban-filter-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #f1eee9;
  border-radius: 999px;
  background: #19a88a;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.kanban-filter-panel {
  display: grid;
  gap: 10px;
  margin: 10px 0 12px;
  padding: 12px;
  border: 1px solid #dedfea;
  border-radius: 8px;
  background: #fff;
}

.kanban-filter-fields {
  display: grid;
  gap: 9px;
}

.kanban-filter-fields label {
  gap: 5px;
  color: #55596f;
  font-size: 11px;
}

.kanban-filter-fields select {
  min-width: 0;
  min-height: 38px;
  padding: 8px 30px 8px 9px;
  background: #fbfcff;
  color: var(--text);
  font-size: 12px;
}

.kanban-filter-clear {
  justify-self: end;
  min-height: 34px;
  padding: 7px 9px;
  background: transparent;
  color: #7b007b;
  font-size: 11px;
}

.kanban-filter-clear:hover:not(:disabled) {
  background: #f7e7f7;
}

.kanban-filter-clear:disabled {
  color: #8b8e9e;
  cursor: default;
  opacity: .65;
}

.kanban-search {
  position: relative;
  display: block;
  margin: 10px 0 12px;
}

.kanban-search > span {
  position: absolute;
  top: 50%;
  left: 12px;
  z-index: 1;
  transform: translateY(-50%);
  color: #6c6f82;
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
}

.kanban-search input {
  min-height: 40px;
  padding: 9px 34px 9px 36px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.kanban-search input::placeholder {
  color: #646779;
}

.kanban-search input:focus {
  border-color: #7b007b;
  outline: 3px solid rgba(123, 0, 123, .12);
}

.kanban-empty {
  margin: 18px 4px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.lead[hidden],
.kanban-empty[hidden] {
  display: none !important;
}

.scheduled-repique-chip {
  display: inline-flex;
  width: fit-content;
  margin-top: 9px;
  padding: 5px 8px;
  border-radius: 6px;
  background: #f7e7f7;
  color: #7b007b;
  font-size: 11px;
  font-weight: 850;
}

.scheduled-repique-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, .55fr);
  gap: 14px;
  margin: 4px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f8fc;
}

.scheduled-repique-box legend {
  padding: 0 6px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.scheduled-repique-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.scheduled-repique-toggle > span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--navy);
  font-weight: 850;
}

.scheduled-repique-toggle input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: #7b007b;
}

.scheduled-repique-toggle small,
.scheduled-repique-error {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.scheduled-repique-date {
  align-self: end;
}

.scheduled-repique-date.inactive {
  opacity: .55;
}

.scheduled-repique-error {
  grid-column: 1 / -1;
  color: #be123c;
}

.repique-title {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.repique-kind {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 850;
}

.repique-kind.scheduled {
  background: #f7e7f7;
  color: #7b007b;
}

.repique-kind.automatic {
  background: #e9f8f4;
  color: #087c66;
}

.channel-report-list {
  gap: 0;
}

.channel-report-item {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.channel-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #eef0f6;
  color: #211f3d;
  font-size: 18px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.channel-icon-facebook {
  background: #1877f2;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 25px;
}

.channel-icon-facebook b {
  transform: translateY(3px);
}

.channel-icon-instagram {
  position: relative;
  background: #c13584;
}

.channel-icon-instagram i {
  position: relative;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-radius: 6px;
}

.channel-icon-instagram i::before {
  position: absolute;
  inset: 4px;
  border: 2px solid #fff;
  border-radius: 50%;
  content: "";
}

.channel-icon-instagram i::after {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.channel-icon-whatsapp {
  background: #16a66a;
  color: #fff;
}

.channel-icon-google {
  background: #eef4ff;
  color: #1769e0;
  font-family: Arial, sans-serif;
}

.channel-icon-organic {
  background: #e8f7ef;
  color: #128052;
  font-size: 23px;
}

.channel-icon-referral {
  background: #fff2df;
  color: #9a5b00;
}

.channel-icon-other {
  background: #eef0f6;
  color: #55596f;
  font-size: 22px;
}

.round-robin-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 4px 0 20px;
  padding: 14px 0;
  border-top: 1px solid #e7e8f1;
  border-bottom: 1px solid #e7e8f1;
}

.round-robin-control.compact {
  margin-bottom: 6px;
}

.round-robin-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.round-robin-copy > div {
  display: grid;
  gap: 3px;
}

.round-robin-copy strong {
  color: #211f3d;
  font-size: 14px;
}

.round-robin-copy small {
  color: #62667a;
  font-size: 12px;
  line-height: 1.4;
}

.round-robin-mark {
  display: inline-flex;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f7e7f7;
  color: #7b007b;
  font-size: 20px;
  font-weight: 900;
}

.round-robin-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  grid-template-columns: none;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.round-robin-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.round-robin-switch > span {
  position: relative;
  display: block;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #c7cad5;
  transition: background-color .18s ease-out;
}

.round-robin-switch > span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(20, 20, 42, .22);
  content: "";
  transition: transform .18s ease-out;
}

.round-robin-switch input:checked + span {
  background: #19a88a;
}

.round-robin-switch input:checked + span::after {
  transform: translateX(20px);
}

.round-robin-switch input:focus-visible + span {
  outline: 3px solid rgba(160, 0, 152, .28);
  outline-offset: 2px;
}

.round-robin-switch input:disabled + span,
.round-robin-switch input:disabled ~ b {
  cursor: wait;
  opacity: .6;
}

.round-robin-switch b {
  min-width: 70px;
  color: #3f4358;
  font-size: 12px;
}

.lead-create-form {
  margin-top: 4px;
}

.reception-dispatch-panel {
  max-width: 1120px;
  margin-inline: auto;
}

.dispatch-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0 18px;
}

.dispatch-toolbar > label {
  width: min(240px, 100%);
}

.dispatch-toolbar select {
  min-height: 42px;
  background: #fff;
}

.dispatch-overview {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  color: #62667a;
  text-align: right;
}

.dispatch-overview strong {
  color: #211f3d;
  font-size: 26px;
}

.dispatch-groups {
  display: grid;
}

.dispatch-seller-group {
  display: block;
  border-top: 1px solid #e7e8f1;
}

.dispatch-seller-toggle {
  display: flex;
  width: 100%;
  min-height: 68px;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 14px 4px;
  border-radius: 0;
  background: transparent;
  color: #211f3d;
  text-align: left;
}

.dispatch-seller-toggle:hover:not(:disabled) {
  background: #faf7fb;
}

.dispatch-seller-toggle:disabled {
  cursor: default;
  opacity: 1;
}

.dispatch-seller-avatar {
  display: inline-flex;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #211f3d;
  color: #fff;
  font-weight: 900;
}

.dispatch-seller-title {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.dispatch-seller-title strong {
  color: #211f3d;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.dispatch-seller-title small {
  display: block;
  color: #6c6f82;
  font-size: 11px;
}

.dispatch-chevron {
  margin-left: auto;
  color: #6c6f82;
  font-size: 24px;
  line-height: 1;
  transition: transform .18s ease-out;
}

.dispatch-seller-group.expanded .dispatch-chevron {
  transform: rotate(90deg);
}

.dispatch-list {
  min-width: 0;
  padding: 0 4px 16px 52px;
}

.dispatch-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid #eceef4;
}

.dispatch-row:first-child {
  padding-top: 0;
}

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

.dispatch-client {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.dispatch-client strong {
  color: #211f3d;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.dispatch-client a {
  width: fit-content;
  color: #5d6073;
  font-size: 12px;
  text-decoration: none;
}

.dispatch-client a:hover {
  color: #7b007b;
  text-decoration: underline;
}

.dispatch-meta {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.dispatch-meta time {
  min-width: 112px;
  color: #62667a;
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dispatch-source {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef0f6;
  color: #55596f;
  font-size: 10px;
  font-weight: 900;
}

.dispatch-source.automatic {
  background: #e9f8f4;
  color: #087c66;
}

.dispatch-empty,
.dispatch-empty-state {
  margin: 0;
  color: #6c6f82;
  font-size: 13px;
}

.dispatch-empty-state {
  display: grid;
  gap: 4px;
  padding: 22px 0;
  border-top: 1px solid #e7e8f1;
}

.dispatch-empty-state strong {
  color: #211f3d;
}

.duplicate-lead-dialog {
  position: relative;
  width: min(500px, 100%);
  padding: 30px;
  border: 0;
  text-align: center;
}

.duplicate-lead-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 1px solid #e7e8f1;
  background: #fff;
  color: #211f3d;
  font-size: 21px;
}

.duplicate-lead-icon {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff1f2;
  color: #be123c;
  font-size: 24px;
  font-weight: 900;
}

.duplicate-lead-dialog h2 {
  margin: 14px 0 7px;
  color: #211f3d;
}

.duplicate-lead-dialog > p {
  margin: 0;
  color: #62667a;
}

.duplicate-lead-details {
  margin: 22px 0;
  text-align: left;
}

.duplicate-lead-details > div {
  display: grid;
  grid-template-columns: minmax(120px, .8fr) minmax(0, 1.2fr);
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid #eceef4;
}

.duplicate-lead-details dt {
  color: #6c6f82;
  font-size: 12px;
}

.duplicate-lead-details dd {
  margin: 0;
  color: #211f3d;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.duplicate-lead-dialog > .primary {
  width: 100%;
  min-height: 46px;
}

@media (min-width: 1024px) {
  .app.collapsed .side > .nav > button {
    position: relative;
  }

  .app.collapsed .side > .nav > button .badge {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 18px;
    height: 18px;
    margin: 0;
    padding: 0 5px;
    font-size: 10px;
  }

  .login {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto;
  }

  .login-frame {
    max-height: none;
    grid-template-rows: auto auto auto;
    row-gap: 14px;
  }

  .login-footer {
    margin-top: 8px;
  }

  .login-version {
    margin-top: -12px;
    padding-bottom: 8px;
    font-size: 10px;
    line-height: 1.2;
  }
}

.panel > div[style*="overflow"] {
  max-width: 100%;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 1360px) {
  .kanban {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (pointer: coarse) {
  button,
  .whatsapp,
  input,
  select {
    min-height: 44px;
  }
}

@media (max-width: 1023px) {
  .app,
  .app.collapsed {
    display: block;
    min-height: 100dvh;
  }

  .app.mobile-nav-open {
    height: 100dvh;
    overflow: hidden;
  }

  .side,
  .app.collapsed .side {
    position: fixed;
    z-index: 41;
    inset: 0 auto 0 0;
    width: min(320px, 88vw);
    height: 100dvh;
    padding: max(16px, env(safe-area-inset-top)) 18px max(16px, env(safe-area-inset-bottom));
    align-items: stretch !important;
    overflow: hidden;
    transform: translateX(-105%);
    transition: transform .2s ease-out;
    box-shadow: 8px 0 24px rgba(15, 15, 32, .2);
  }

  .app.mobile-nav-open > .side,
  .app.collapsed.mobile-nav-open > .side {
    transform: translate3d(0, 0, 0) !important;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    z-index: 40;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border-radius: 0;
    background: rgba(17, 18, 36, .52);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease-out;
  }

  .mobile-nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .side > .brand-logo,
  .app.collapsed .side > .brand-logo {
    flex-basis: 94px !important;
    width: 226px !important;
    height: 94px !important;
    min-height: 94px !important;
    padding: 8px 0 !important;
    align-self: flex-start;
  }

  .side > .nav {
    overflow-y: auto;
    padding-right: 4px;
  }

  .app.collapsed .label,
  .app.collapsed .chev {
    display: inline;
  }

  .app.collapsed .side-credit {
    display: flex;
  }

  .app.collapsed .admin-submenu:not(.closed) {
    display: grid;
  }

  .app.collapsed .nav button,
  .app.collapsed .logout-bottom > button {
    width: 100%;
    justify-content: flex-start;
  }

  .app.collapsed .nav-admin-toggle {
    margin-top: 8px;
    padding-top: 16px !important;
    border-top: 1px solid rgba(255, 255, 255, .12) !important;
  }

  .collapse-toggle,
  .app.collapsed .collapse-toggle {
    align-self: flex-end;
  }

  .main {
    width: 100%;
    min-width: 0;
    padding: 22px 20px 40px;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    background: #fff;
    color: #211f3d;
    border: 1px solid #e7e8f1;
  }

  .top {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
  }

  .top-title {
    min-width: 0;
  }

  .top-title h1,
  .top-title p {
    overflow-wrap: anywhere;
  }

  .top-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

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

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

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

  .kanban-filter-toggle {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .kanban-filter-fields select {
    min-height: 44px;
    font-size: 16px;
  }

  .kanban-toolbar {
    align-items: flex-start;
  }

  .scheduled-repique-box {
    grid-template-columns: 1fr;
  }

  .scheduled-repique-date {
    align-self: stretch;
  }

  .mobile-stage-move {
    display: grid;
    gap: 6px;
    margin-top: 12px;
    color: #55596f;
    font-size: 12px;
  }

  .mobile-stage-move select {
    background: #fff;
  }

  .filters {
    align-items: stretch;
  }

  .filters label {
    flex: 1 1 220px;
  }

  .login {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
    padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  }

  .login-frame {
    width: min(620px, 100%);
    max-height: none;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .login-info {
    display: none;
  }

  .login-card {
    padding: 34px;
  }

  .login-logo {
    width: min(300px, 88%);
  }

  .login-footer,
  .login-version {
    grid-column: 1;
  }
}

@media (max-width: 767px) {
  .main {
    padding: 16px 12px max(28px, env(safe-area-inset-bottom));
  }

  .top {
    margin-bottom: 16px;
  }

  .top h1 {
    font-size: 25px;
    line-height: 1.2;
  }

  .top p {
    font-size: 13px;
    line-height: 1.4;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .kanban-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .kanban-export {
    width: 100%;
  }

  .top-actions > .ghost:first-child {
    flex: 1 1 auto;
  }

  .top-bell {
    width: 48px;
    height: 48px;
  }

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

  .card,
  .panel {
    min-width: 0;
  }

  .card {
    padding: 16px;
  }

  .card strong {
    font-size: 26px;
    overflow-wrap: anywhere;
  }

  .panel {
    padding: 16px;
  }

  .round-robin-control {
    display: grid;
    gap: 14px;
  }

  .round-robin-switch {
    width: 100%;
    justify-content: space-between;
  }

  .round-robin-switch b {
    margin-left: auto;
    text-align: right;
  }

  .dispatch-toolbar {
    display: grid;
    align-items: stretch;
    gap: 12px;
  }

  .dispatch-toolbar > label {
    width: 100%;
  }

  .dispatch-overview {
    justify-content: flex-start;
    text-align: left;
  }

  .dispatch-list {
    padding-left: 48px;
  }

  .dispatch-row {
    align-items: flex-start;
  }

  .panel-head {
    align-items: stretch;
  }

  .panel-head > button,
  .panel-head > a {
    width: 100%;
  }

  .modal-box > .panel-head {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
  }

  .modal-box > .panel-head > .icon-btn {
    flex: 0 0 40px;
    width: 40px;
    min-width: 40px;
    margin-left: auto;
  }

  input,
  select,
  textarea {
    min-height: 48px;
    font-size: 16px;
  }

  textarea {
    min-height: 120px;
  }

  .kanban {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 12px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .kanban .col {
    flex: 0 0 min(88vw, 390px);
    width: min(88vw, 390px);
    min-height: 480px;
    scroll-snap-align: start;
  }

  .kanban-search input {
    min-height: 44px;
  }

  .kanban-filter-toggle {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .kanban-filter-fields select {
    min-height: 44px;
    font-size: 16px;
  }

  .col header h2 {
    font-size: 20px;
  }

  .lead {
    cursor: default;
  }

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

  .lead-actions button,
  .lead-actions a {
    min-height: 44px;
  }

  .panel > div[style*="overflow"] {
    margin-inline: -16px;
    padding-inline: 16px;
  }

  table {
    min-width: 700px;
  }

  .filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .filters > *,
  .filters button,
  .filters a {
    width: 100%;
  }

  .report-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .channel-report-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .channel-report-item > b {
    grid-column: 2;
    justify-self: start;
  }

  .report-item .value,
  .report-item .progress,
  .progress {
    grid-column: 2;
    text-align: left;
  }

  .repique-card {
    grid-template-columns: 1fr;
  }

  .repique-card .table-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .repique-card .table-actions > * {
    width: 100%;
  }

  .modal {
    align-items: flex-end;
    padding: 0;
  }

  .modal-box {
    width: 100%;
    max-height: 92dvh;
    padding: 18px 16px max(18px, env(safe-area-inset-bottom));
    border-radius: 12px 12px 0 0;
  }

  .daily-greeting-modal,
  .password-choice-modal,
  .duplicate-lead-modal {
    align-items: center;
    padding: 16px;
  }

  .daily-greeting-modal .greeting-dialog {
    width: min(100%, 480px);
    padding: 28px 20px 20px;
    border-radius: 12px;
  }

  .password-choice-modal .password-choice-dialog {
    width: min(100%, 520px);
    padding: 28px 20px 20px;
    border-radius: 12px;
  }

  .duplicate-lead-modal .duplicate-lead-dialog {
    width: min(100%, 500px);
    padding: 28px 20px 20px;
    border-radius: 12px;
  }

  .password-choice-dialog h2 {
    font-size: 24px;
  }

  .password-choice-fields,
  .password-choice-actions {
    grid-template-columns: 1fr;
  }

  .greeting-dialog h2 {
    padding-inline: 24px;
    font-size: 24px;
  }

  .greeting-dialog p {
    font-size: 16px;
  }

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

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .modal-actions > * {
    width: 100%;
  }

  .login {
    align-items: center;
    padding-inline: 14px;
  }

  .login-card {
    padding: 28px 20px;
  }

  .login-logo {
    width: min(250px, 86%);
    margin-bottom: 22px;
  }

  .login-footer {
    flex-wrap: wrap;
    gap: 6px;
    padding-inline: 8px;
    text-align: center;
  }

  .login-version {
    margin-top: -4px;
  }
}

@media (max-width: 479px) {
  .user-trigger {
    min-width: 48px;
    width: 48px;
    height: 48px;
    padding: 3px;
    justify-content: center;
  }

  .user-trigger > span:not(.profile-photo) {
    display: none;
  }

  .user-trigger .profile-photo {
    width: 38px;
    height: 38px;
  }

  .user-dropdown {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
  }

  .lead-head,
  .lead-meta {
    align-items: flex-start;
  }

  .lead-meta {
    flex-direction: column;
  }

  .lead-meta b {
    overflow-wrap: anywhere;
  }

  .dispatch-row,
  .dispatch-meta {
    display: grid;
    justify-content: stretch;
  }

  .dispatch-list {
    padding-left: 4px;
  }

  .dispatch-meta {
    gap: 6px;
  }

  .dispatch-meta time {
    min-width: 0;
    text-align: left;
  }

  .dispatch-source {
    width: fit-content;
  }

  .duplicate-lead-details > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .greeting-close {
    top: 10px;
    right: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
