:root {
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
  color: #14213e;
  background: #f5f8f9;
  font-synthesis: none;
  --green: #007e68;
  --mint: #e9f6f2;
  --line: #e2e9ee;
  --muted: #586780;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
.button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: #213255;
  padding: 9px 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
}
button:hover,
.button:hover {
  border-color: #8fbcb0;
  background: #f4faf8;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button.primary,
.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
button.primary:hover {
  background: #006453;
}
input,
select,
textarea {
  border: 1px solid #d8e1e9;
  border-radius: 7px;
  padding: 10px 12px;
  color: inherit;
  background: white;
  min-width: 0;
  min-height: 44px;
  max-width: 100%;
  font-size: 16px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #95cebd;
  outline-offset: 1px;
}
:focus-visible {
  outline: 2px solid #007e68;
  outline-offset: 3px;
}
input:disabled,
select:disabled,
textarea:disabled {
  background: #f3f5f6;
}
textarea {
  resize: vertical;
  width: 100%;
  min-height: 80px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #44516d;
  margin-bottom: 15px;
}
label.inline {
  flex-direction: row;
  align-items: center;
  margin: 0;
}
input[type='checkbox'] {
  accent-color: var(--green);
  width: 22px;
  height: 22px;
  min-height: 22px;
  flex-shrink: 0;
}
a {
  color: #007b65;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1 {
  font-size: 26px;
  letter-spacing: -0.6px;
  margin: 0;
  font-weight: 650;
}
h2 {
  font-size: 16px;
  margin: 0 0 16px;
  font-weight: 650;
}
p {
  line-height: 1.55;
}
small {
  color: var(--muted);
  display: block;
  font-size: 13px;
  line-height: 1.5;
}
.muted {
  color: var(--muted);
  font-size: 14px;
}
.sidebar {
  width: 215px;
  position: fixed;
  inset: 0 auto 0 0;
  background: white;
  border-right: 1px solid var(--line);
  padding: 25px 15px 14px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 10;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: #101c36;
  font:
    700 20px Georgia,
    serif;
  padding: 0 0 30px;
  white-space: nowrap;
  text-decoration: none !important;
}
.brand small {
  font:
    13px 'Segoe UI',
    sans-serif;
  color: #98a4ba;
  letter-spacing: 1px;
}
.logo {
  background: linear-gradient(140deg, #003f35, #00a17e);
  color: white;
  border-radius: 12px 5px 12px 5px;
  font:
    italic 800 35px 'Segoe UI',
    sans-serif;
  width: 43px;
  height: 46px;
  display: grid;
  place-content: center;
  flex-shrink: 0;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
nav a {
  padding: 13px 14px;
  color: #44516d;
  border-radius: 8px;
  display: flex;
  gap: 17px;
  align-items: center;
  font-weight: 500;
}
nav a span {
  font-size: 23px;
  width: 23px;
  text-align: center;
}
nav a.active {
  color: #006d59;
  background: var(--mint);
}
nav a:hover {
  background: #f2f7f5;
  text-decoration: none;
}
nav a:last-child {
  margin-top: 20px;
}
.profile {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 9px;
  align-items: center;
}
.profile .icon {
  margin-left: auto;
}
.avatar {
  border-radius: 50%;
  width: 35px;
  height: 35px;
  flex-shrink: 0;
  display: grid;
  place-content: center;
  background: #e1f3ec;
  color: var(--green);
  font-weight: 600;
}
.workspace {
  margin-left: 215px;
}
.topbar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfd;
}
.environment {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  background: #eef3f5;
  color: #6b7892;
  border-radius: 8px;
  font-size: 12px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #75ab98;
}
#content {
  padding: 22px 24px;
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 25px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: #83958e;
  margin: 0 0 8px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.panel {
  background: white;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 16px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.section-heading h2 {
  margin-bottom: 14px;
}
.count {
  background: #eff3f6;
  color: #7c8aa0;
  padding: 3px 7px;
  border-radius: 8px;
  font-size: 12px;
  margin-left: 6px;
  font-weight: 500;
}
.list-controls {
  background: white;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 12px;
}
.title-tabs {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.title-tabs .primary {
  margin-left: auto;
}
.tabs {
  display: flex;
  background: #f1f4f7;
  padding: 3px;
  border-radius: 7px;
  gap: 3px;
}
.tabs a,
.tabs button {
  padding: 8px 15px;
  border: 0;
  color: #62718d;
  background: transparent;
  border-radius: 5px;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tabs .selected {
  color: white;
  background: var(--green);
}
.filters {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 14px;
  align-items: center;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.chip {
  font-size: 14px;
  border: 0;
  background: #f2f4f7;
  padding: 8px 11px;
}
.chip.selected {
  background: var(--mint);
  color: #00624f;
}
#search,
.search-bar {
  display: flex;
  gap: 8px;
}
#search input {
  flex: 1;
  width: 0;
}
.search-bar {
  margin-bottom: 17px;
}
.search-bar input {
  width: min(500px, 100%);
  flex: 1;
}
.inquiry-layout {
  display: grid;
  grid-template-columns: minmax(230px, 28%) 1fr;
  gap: 12px;
  align-items: start;
}
.inquiry-layout.has-detail {
  grid-template-columns: minmax(230px, 0.9fr) minmax(360px, 1.6fr) minmax(240px, 0.9fr);
}
.inquiry-list {
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  overflow: auto;
  max-height: calc(100vh - 300px);
}
.inquiry-row {
  padding: 17px 14px;
  display: flex;
  gap: 11px;
  border-bottom: 1px solid #edf0f4;
  color: inherit;
  text-decoration: none !important;
}
.inquiry-row:hover,
.inquiry-row.selected {
  background: #ebf7f2;
}
.inquiry-row div {
  min-width: 0;
}
.inquiry-row strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}
.inquiry-row span:not(.channel) {
  display: block;
  color: #667692;
  font-size: 13px;
}
.inquiry-row small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 5px 0;
}
.row-meta {
  font-size: 12px !important;
}
.channel {
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-content: center;
  color: white;
  font-size: 17px;
  font-weight: 700;
  flex-shrink: 0;
}
.telegram {
  background: #10a8e5;
}
.max {
  background: #824be2;
}
.whatsapp {
  background: #11b577;
}
.site {
  background: #45547b;
}
.select-empty {
  display: grid;
  align-content: center;
  text-align: center;
  min-height: 400px;
  color: #82908e;
}
.select-empty h2 {
  color: #40526b;
  margin: 15px 0 0;
}
.large-icon {
  font-size: 50px;
  color: #a2bfb4;
}
.conversation {
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  overflow: hidden;
}
.conversation-header {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.conversation-header h2 {
  margin: 4px 0 13px;
  font-size: 19px;
  overflow-wrap: anywhere;
}
.conversation-header select {
  font-size: 15px;
  padding: 8px;
  max-width: 100%;
}
.recipient {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  overflow-wrap: anywhere;
  flex-wrap: wrap;
}
.recipient .badge {
  margin-left: auto;
}
.recipient small {
  font-size: 12px;
}
.messages {
  padding: 17px;
  min-height: 250px;
  max-height: 450px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 14px;
  background: #fff;
}
.message {
  background: #f1f4f7;
  padding: 11px 13px;
  border-radius: 8px;
  max-width: 94%;
  overflow-wrap: anywhere;
}
.message p {
  margin: 5px 0;
  white-space: pre-wrap;
}
.message footer {
  color: #7d89a0;
  font-size: 12px;
  margin-top: 7px;
}
.message.outgoing {
  background: #e8f6f1;
  align-self: end;
}
.message.note {
  background: #fff6e1;
  width: 100%;
  max-width: 100%;
}
.message.note > small {
  color: #a56b0f;
}
.message .unknown {
  font-size: 11px;
  color: #9d5a0a;
  border-top: 1px solid #e7d6ab;
  padding-top: 8px;
}
.message audio {
  max-width: 100%;
  height: 35px;
  margin-top: 8px;
}
.composer {
  padding: 13px 16px;
  border-top: 1px solid var(--line);
}
.composer .tabs {
  display: inline-flex;
}
.composer .tabs button {
  font-size: 14px;
  padding: 7px 9px;
}
.composer.internal {
  background: #fffdf8;
}
.composer.internal .tabs .selected {
  background: #fff0ce;
  color: #925e0b;
}
.composer .muted {
  font-size: 13px;
  margin: 10px 0;
}
.composer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
}
.composer button {
  font-size: 14px;
}
.upload {
  position: relative;
  margin: 0;
  cursor: pointer;
  font-size: 13px;
  color: var(--green);
}
.upload input {
  width: 210px;
  font-size: 13px;
  padding: 5px;
}
.warning-text {
  color: #a47718;
  font-size: 13px;
}
.context .panel {
  padding: 16px;
}
.context h2 {
  font-size: 16px;
}
.client-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}
.context .button {
  font-size: 14px;
}
.badge {
  display: inline-block;
  font-size: 12px;
  padding: 5px 7px;
  border-radius: 6px;
  background: #f0f3f6;
  color: #78859c;
  white-space: normal;
  line-height: 1.5;
}
.badge.warning {
  color: #ab680d;
  background: #fff4db;
}
.badge.success {
  color: #00765f;
  background: #e5f4ed;
}
.order-link {
  display: grid;
  gap: 7px;
  padding: 12px 0;
  border-top: 1px solid #edf0f4;
}
.order-link strong {
  color: #253555;
}
.record-link {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid #edf0f4;
}
.order-link + button {
  margin-top: 10px;
}
.record-link span {
  color: var(--muted);
  font-size: 12px;
}
.task {
  display: flex;
  gap: 10px;
  padding: 13px 0;
  align-items: start;
  border-bottom: 1px solid #edf0f4;
}
.task strong {
  font-size: 15px;
  font-weight: 500;
}
.task small {
  margin-top: 6px;
}
.task a {
  display: inline-block;
  font-size: 12px;
  margin-top: 7px;
}
.task .check {
  width: 44px;
  height: 44px;
  border: 1.5px solid #8797af;
  border-radius: 4px;
  padding: 0;
  margin-top: 2px;
  flex-shrink: 0;
}
.task.completed strong {
  text-decoration: line-through;
  color: #85949a;
}
.task.completed .check {
  border-color: var(--green);
  background: var(--green);
  color: white;
}
.overdue {
  color: #bd7215;
}
.link {
  border: 0;
  background: transparent;
  padding: 0;
  color: #007a63;
  font-size: 14px;
}
.empty {
  padding: 15px 5px;
  text-align: center;
  color: #929dac;
  font-size: 12px;
}
.loading {
  padding: 50px;
  text-align: center;
  color: #729287;
}
.pager {
  display: flex;
  justify-content: end;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.pager span {
  margin-right: auto;
}
.board-tip {
  margin: 18px 3px 8px;
  font-size: 12px;
}
.board {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
  min-height: 420px;
}
.column {
  --stage-color: #43a9d1;
  min-width: 0;
}
.column:nth-child(2) {
  --stage-color: #258dbb;
}
.column:nth-child(3) {
  --stage-color: #8673bf;
}
.column:nth-child(4) {
  --stage-color: #b47b17;
}
.column:nth-child(5) {
  --stage-color: #348c68;
}
.column:nth-child(6) {
  --stage-color: #658594;
}
.column .stage-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  gap: 6px;
  min-height: 62px;
  margin: 0;
  padding: 10px 13px 10px 10px;
  background: var(--stage-color);
  color: white;
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 0 100%, 6px 50%);
}
.stage-heading .count {
  background: transparent;
  color: white;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}
.stage-info {
  margin: 0;
  padding: 8px 6px;
  font-size: 11px;
  color: var(--muted);
}
.board-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 11px 10px 9px;
  margin: 0 0 9px;
  background: white;
  color: #25384b;
  box-shadow: 0 2px 3px #152f4106;
  text-decoration: none !important;
}
.board-card[draggable='true'] {
  cursor: grab;
  user-select: none;
}
.board-card:hover {
  border-color: #78b7ab;
  box-shadow: 0 3px 10px #152f4114;
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  gap: 4px;
  margin-bottom: 8px;
}
.board-card strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
}
.card-price {
  font-size: 15px;
  margin: 6px 0 10px;
  font-variant-numeric: tabular-nums;
}
.card-price small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.board-card .card-client {
  color: #287f73;
  font-size: 12px;
  margin: 0 0 7px;
}
.card-preview {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}
.card-task {
  padding: 6px;
  font-size: 11px;
  background: #e7f4f1;
  color: #287f73;
  border-radius: 3px;
  margin-bottom: 9px;
}
.card-task.overdue,
.card-task.first-reply {
  background: #fff0df;
  color: #8c5a1e;
}
.card-bottom {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.card-bottom .avatar {
  width: 22px;
  height: 22px;
  font-size: 11px;
  font-weight: 400;
}
.card-assignee {
  min-width: 0;
}
.card-channel {
  margin-left: auto;
  flex-shrink: 0;
  background: transparent;
}
.card-channel.telegram {
  color: #2584b1;
}
.card-channel.max {
  color: #946d28;
}
.card-channel.whatsapp {
  color: #387e62;
}
.card-channel.site {
  color: #288571;
}
.kanban-view {
  --muted: #687d8d;
  --line: #dde6ec;
  color: #25384b;
}
.kanban-view .workspace {
  background: #eaf1f5;
  min-height: 100dvh;
}
.kanban-view .sidebar {
  background: #173b50;
  color: #e4f1f6;
  border-color: #294c5f;
}
.kanban-view .brand,
.kanban-view nav a {
  color: #e4f1f6;
}
.kanban-view .brand small {
  display: block;
  font-size: 11px;
  letter-spacing: 2.5px;
  color: #a8c8d8;
}
.kanban-view .logo {
  display: none;
}
.kanban-view nav a:hover {
  background: #ffffff12;
}
.kanban-view nav a.active {
  background: #ffffff18;
  color: white;
  box-shadow: inset 3px 0 #6bd9c0;
}
.kanban-view .profile {
  border-color: #ffffff20;
}
.kanban-view .profile small {
  color: #b7ceda;
}
.kanban-view .profile .icon {
  color: #e4f1f6;
  background: transparent;
  border-color: #ffffff30;
}
.kanban-view .topbar {
  background: white;
}
.kanban-view .environment {
  background: #e7f4f1;
  color: #287f73;
  border-radius: 4px;
}
.board-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px 18px;
  background: transparent;
  border: 0;
  padding: 0;
  margin-bottom: 22px;
  border-radius: 0;
}
.board-controls .title-tabs {
  display: contents;
}
.board-controls h1 {
  grid-row: 1;
  font-size: 25px;
  font-weight: 500;
}
.board-controls h1 .count {
  background: transparent;
  padding: 0;
  font-size: 16px;
}
.board-controls .title-tabs > .primary {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  margin: 0;
  border-radius: 4px;
}
.board-controls .tabs {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
  background: transparent;
  padding: 0;
  gap: 4px;
  width: auto;
}
.board-controls .tabs a {
  padding: 8px;
  border-radius: 0;
  font-size: 12px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
}
.board-controls .tabs .selected {
  color: #287f73;
  background: transparent;
  border-bottom-color: #329c8a;
}
.board-controls #search {
  grid-column: 2;
  grid-row: 2;
}
.board-controls #search input {
  font-size: 14px;
  border-radius: 4px;
}
.board-controls .filters {
  grid-column: 1 / -1;
  grid-row: 3;
  margin: 0;
}
.board-controls .chip {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  border-radius: 4px;
}
.board-controls .chip.selected {
  background: white;
  color: #287f73;
  border-color: var(--line);
}
.board-controls .channel-filter select {
  font-size: 13px;
  border-radius: 4px;
}
@media (min-width: 901px) {
  .kanban-view .sidebar {
    width: 176px;
    padding: 24px 8px 14px;
  }
  .kanban-view .workspace {
    margin-left: 176px;
  }
  .kanban-view .brand {
    padding: 0 4px 30px;
  }
  .kanban-view nav {
    gap: 8px;
  }
  .kanban-view nav a {
    padding: 11px 10px;
    font-size: 13px;
    gap: 9px;
    border-radius: 5px;
  }
  .kanban-view nav a span {
    font-size: 19px;
    width: 18px;
  }
  .kanban-view nav a:last-child {
    margin: 0;
  }
  .kanban-view .profile {
    flex-wrap: wrap;
    font-size: 12px;
  }
}
@media (max-width: 1100px) {
  .board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 10px;
  }
}
@media (max-width: 700px) {
  .board-controls #search {
    display: flex;
  }
  .board-controls #search input {
    width: 0;
    font-size: 16px;
  }
}
@media (max-width: 580px) {
  .board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 8px;
  }
  .kanban-view #content {
    padding: 16px 12px;
  }
  .board-controls {
    gap: 12px 8px;
  }
  .board-controls h1 {
    font-size: 22px;
  }
  .board-controls h1 .count {
    font-size: 14px;
  }
  .board-controls .tabs {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-self: start;
  }
  .board-controls #search {
    grid-row: 3;
    grid-column: 1 / -1;
  }
  .board-controls .filters {
    grid-row: 4;
  }
  .board-controls .title-tabs > .primary {
    font-size: 12px;
    padding-inline: 8px;
  }
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr);
  gap: 20px;
  align-items: start;
}
.order-detail {
  grid-template-columns: minmax(400px, 2fr) minmax(250px, 1fr);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th {
  color: #8591a5;
  font-weight: 500;
  font-size: 12px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 17px 15px;
  border-bottom: 1px solid #edf0f4;
}
.items td {
  padding: 8px 4px;
}
.items th {
  padding: 7px 4px;
}
.items input {
  width: 100%;
  min-width: 85px;
}
.items td:first-child input {
  min-width: 160px;
}
.items td:nth-child(3) input {
  min-width: 60px;
}
.items td:last-child {
  width: 30px;
}
.order-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 24px 0;
}
.order-summary label {
  margin: 0;
  max-width: 170px;
}
.stats {
  display: flex;
  gap: 20px;
}
.stats .panel {
  flex: 1;
}
.stats strong {
  display: block;
  font-size: 32px;
  margin-top: 15px;
}
.stats span {
  color: var(--muted);
}
.integration,
.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid #edf0f4;
}
.integration .badge,
.user-row button {
  margin-left: auto;
}
.integration strong {
  font-size: 15px;
}
.user-row button {
  font-size: 12px;
}
.icon {
  padding: 5px;
  border: 0;
  font-size: 21px;
  background: transparent;
}
.mobile-back {
  display: none;
}
.login {
  width: min(430px, calc(100% - 36px));
  margin: 11vh auto;
  background: white;
  padding: 35px;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 15px 55px #244b3a08;
}
.login h1 {
  font-size: 23px;
}
.login form {
  margin-top: 25px;
}
.login form > button {
  width: 100%;
}
#login-error {
  color: #ae3e3e;
  font-size: 12px;
}
.notice {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #006752;
  color: white;
  padding: 14px 22px;
  border-radius: 9px;
  box-shadow: 0 3px 22px #193a3b35;
  max-width: min(650px, 90vw);
  z-index: 20;
  line-height: 1.5;
}
.notice.error {
  background: #994831;
}
.notice[hidden] {
  display: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 30px;
  width: min(760px, 94vw);
  color: inherit;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #152f3c55;
  backdrop-filter: blur(2px);
}
.dialog-close {
  position: absolute;
  right: 12px;
  top: 8px;
}
dialog h2 {
  padding-right: 30px;
  margin-bottom: 23px;
}
dialog form:not(.dialog-close) > .primary {
  margin-top: 8px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
html {
  scroll-padding-bottom: 100px;
}
.workspace,
#content,
.inquiry-layout > *,
.detail-grid > *,
.form-grid > *,
.context,
.task > div {
  min-width: 0;
}
.compact-filter,
.mobile-detail-actions {
  display: none;
}
.channel-filter {
  margin: 0;
  flex-shrink: 0;
}
.recipient > div {
  min-width: 0;
  flex: 1;
}
summary {
  cursor: pointer;
  padding-block: 10px;
  min-height: 44px;
}
.client-heading strong,
.integration > div,
.user-row > div {
  min-width: 0;
}
.composer-bottom {
  flex-wrap: wrap;
}
#staged {
  overflow-wrap: anywhere;
}

@media (max-width: 1400px) {
  .sidebar {
    width: 200px;
    padding-inline: 10px;
  }
  .brand {
    font-size: 19px;
  }
  .workspace {
    margin-left: 200px;
  }
  #content {
    padding: 20px;
  }
  .inquiry-layout.has-detail {
    grid-template-columns: 240px minmax(0, 1fr);
  }
  .inquiry-layout.has-detail .inquiry-list {
    grid-row: span 2;
  }
  .context {
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .context .panel {
    margin: 0;
  }
  .title-tabs {
    gap: 12px;
  }
  .filters {
    flex-wrap: wrap;
  }
  .order-detail {
    grid-template-columns: minmax(0, 1fr);
  }
  .order-detail > aside {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}
@media (max-width: 1100px) {
  .inquiry-layout,
  .inquiry-layout.has-detail {
    grid-template-columns: minmax(0, 1fr);
  }
  .inquiry-list {
    max-height: none;
  }
  .inquiry-layout.has-detail .inquiry-list,
  .select-empty,
  .detail-controls,
  .inquiry-layout.has-detail + .pager {
    display: none;
  }
  .context {
    grid-column: 1;
  }
  .mobile-detail-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }
  .mobile-back {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 600;
  }
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .topbar {
    padding-inline: 20px;
    justify-content: end;
    height: 56px;
  }
  .topbar > .muted {
    display: none;
  }
  .title-tabs h1 {
    flex: 1;
    font-size: 24px;
  }
  .title-tabs .tabs {
    order: 1;
    width: 100%;
  }
  .title-tabs .tabs a {
    flex: 1;
  }
  .page-title {
    flex-wrap: wrap;
  }
}
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    height: auto;
    padding: 6px max(4px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom))
      max(4px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    border-right: 0;
    overflow: visible;
    box-shadow: 0 -4px 20px #14213e08;
  }
  .sidebar .brand,
  .profile {
    display: none;
  }
  nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
  }
  nav a,
  nav a.active {
    min-height: 56px;
    padding: 4px 2px;
    font-size: 12px;
    flex-direction: column;
    gap: 2px;
    line-height: 1.3;
    white-space: nowrap;
    overflow-wrap: normal;
  }
  nav a span {
    font-size: 22px;
    height: 26px;
    width: auto;
  }
  nav a:last-child {
    margin: 0;
  }
  .workspace {
    margin: 0;
    padding: 0 env(safe-area-inset-right) calc(88px + env(safe-area-inset-bottom))
      env(safe-area-inset-left);
  }
  #content {
    padding: 16px;
  }
  .topbar {
    height: 48px;
    padding-inline: 16px;
  }
  .environment {
    font-size: 12px;
    padding: 6px 10px;
  }
  .notice {
    bottom: calc(84px + env(safe-area-inset-bottom));
    width: max-content;
    max-width: 92vw;
  }
  .login {
    margin-block: 5vh;
  }
}
@media (max-width: 700px) {
  .list-controls {
    padding: 16px;
  }
  .chips {
    display: none;
  }
  .filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    align-items: end;
  }
  .compact-filter {
    display: flex;
    margin: 0;
    font-size: 13px;
  }
  .channel-filter .sr-only {
    position: static;
    width: auto;
    height: auto;
    clip: auto;
    white-space: normal;
    overflow: visible;
    font-size: 13px;
  }
  .filters select {
    width: 100%;
  }
  .title-tabs {
    gap: 12px;
  }
  .title-tabs > button {
    font-size: 14px;
    padding-inline: 10px;
  }
  #search,
  .search-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  #search input,
  .search-bar input {
    grid-column: 1 / -1;
    width: 100%;
  }
  #search > button:first-of-type,
  .search-bar > button:first-of-type {
    justify-self: stretch;
  }
  #search > button:last-of-type,
  .search-bar > button:last-of-type {
    min-width: 48px;
  }
  .context,
  .order-detail > aside {
    display: block;
  }
  .context .panel,
  .order-detail > aside .panel {
    margin-bottom: 16px;
  }
  .conversation-header .actions {
    align-items: stretch;
  }
  .conversation-header select {
    width: 100%;
    font-size: 16px;
  }
  .recipient .badge {
    margin-left: 42px;
  }
  .messages {
    min-height: 200px;
    max-height: 50vh;
    max-height: 50dvh;
    padding: 16px 12px;
  }
  .message {
    max-width: 100%;
  }
  .composer .tabs {
    display: flex;
  }
  .composer .tabs button {
    flex: 1;
    font-size: 14px;
  }
  .composer-bottom {
    align-items: stretch;
  }
  .composer-bottom > button {
    width: 100%;
  }
  .upload,
  .upload input {
    width: 100%;
  }
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .record-link {
    flex-direction: column;
  }
  .stats {
    gap: 12px;
  }
  .stats .panel {
    padding: 16px;
  }
  .stats span {
    font-size: 13px;
  }
  .panel {
    padding: 16px;
  }
  .section-heading {
    flex-wrap: wrap;
    align-items: center;
  }
  .section-heading .inline {
    min-height: 44px;
  }
  .login {
    width: calc(100% - 24px);
    padding: 24px;
  }
  dialog {
    padding: 24px 16px;
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 32px);
  }
  .order-summary {
    align-items: center;
    flex-wrap: wrap;
  }
  .order-summary label {
    width: 140px;
  }
  .pager {
    flex-wrap: wrap;
    font-size: 13px;
  }
  .pager span {
    flex-basis: 100%;
  }
  .pager button {
    flex: 1;
    font-size: 14px;
  }
  .records {
    padding: 0;
    overflow: visible;
  }
  .records table,
  .records tbody,
  .records tr {
    display: block;
  }
  .records thead,
  .items thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .records tr {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }
  .records tr:last-child {
    border-bottom: 0;
  }
  .records td {
    display: grid;
    grid-template-columns: minmax(75px, 0.7fr) minmax(0, 1.3fr);
    align-items: baseline;
    gap: 12px;
    border: 0;
    padding: 6px 0;
  }
  .records td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 13px;
  }
  .records td:first-child a {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    min-height: 44px;
  }
  .records td[colspan] {
    display: block;
  }
  .records td[colspan]::before {
    content: none;
  }
  .items,
  .items tbody {
    display: block;
    width: 100%;
  }
  .items tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }
  .items td,
  .items td:last-child {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: auto;
    padding: 0;
    border: 0;
  }
  .items td::before {
    content: attr(data-label);
    font-size: 13px;
    color: var(--muted);
  }
  .items td:first-child {
    grid-column: 1 / -1;
  }
  .items td:last-child {
    justify-content: end;
  }
  .items td:last-child::before {
    content: none;
  }
  .items td:last-child button {
    align-self: end;
    min-width: 44px;
  }
  .items input,
  .items td:first-child input,
  .items td:nth-child(3) input {
    min-width: 0;
    width: 100%;
  }
  .user-row {
    flex-wrap: wrap;
  }
  .user-row button {
    margin-left: 0;
  }
}
@media (max-width: 360px) {
  nav {
    gap: 0;
  }
  nav a,
  nav a.active {
    font-size: 11px;
    padding-inline: 0;
    letter-spacing: -0.35px;
  }
  #content {
    padding: 12px;
  }
  .title-tabs h1 {
    font-size: 22px;
  }
  .title-tabs .primary {
    margin-left: 0;
  }
  .filters {
    grid-template-columns: minmax(0, 1fr);
  }
  .stats {
    flex-direction: column;
    gap: 0;
  }
  .recipient .badge {
    margin-left: 0;
  }
}
@media (pointer: coarse) {
  .record-link,
  .task a,
  .message a {
    min-height: 44px;
  }
  .task a,
  .message a {
    display: inline-flex;
    align-items: center;
  }
}
.incoming-notice {
  position: fixed;
  z-index: 15;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 8px;
  background: #e8f5ec;
  border: 1px solid #7fb28f;
  border-radius: 10px;
  box-shadow: 0 4px 18px #0002;
}
.incoming-notice button {
  white-space: normal;
}
.incoming-notice[hidden] {
  display: none;
}
@media (max-width: 900px) {
  .incoming-notice {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
}
