* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #eef3f0;
  color: #18231f;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.admin-shell {
  background:
    linear-gradient(180deg, rgba(31, 157, 104, 0.08), rgba(31, 157, 104, 0) 240px),
    #eef3f0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  background: linear-gradient(180deg, #10231c 0%, #162c24 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: #eef8f3;
  min-height: 100vh;
  padding: 22px 16px;
  position: sticky;
  top: 0;
}

.brand {
  align-items: center;
  display: flex;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 24px;
}

.brand-mark {
  background: #1f9d68;
  border-radius: 8px;
  color: #ffffff;
  display: grid;
  font-size: 13px;
  height: 34px;
  place-items: center;
  width: 34px;
}

.nav {
  display: grid;
  gap: 18px;
}

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

.nav-label {
  color: rgba(238, 248, 243, 0.5);
  font-size: 11px;
  font-weight: 800;
  padding: 0 10px;
  text-transform: uppercase;
}

.nav a {
  border-radius: 8px;
  color: #c9dcd3;
  display: block;
  font-size: 14px;
  font-weight: 650;
  padding: 11px 12px;
}

.nav a:hover,
.nav a.active {
  background: rgba(31, 157, 104, 0.18);
  color: #ffffff;
}

.nav a.active {
  box-shadow: inset 3px 0 0 #1f9d68;
}

.main {
  min-width: 0;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #dbe6df;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-title {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.topbar-subtitle {
  color: #667085;
  font-size: 12px;
  margin-top: 3px;
}

.topbar-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.topbar-link,
.user-chip {
  background: #f4f7f5;
  border: 1px solid #dbe6df;
  border-radius: 999px;
  color: #40534b;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 10px;
}

.logout-form {
  margin: 0;
}

.logout-button {
  cursor: pointer;
  font-family: inherit;
}

.menu-toggle {
  align-items: center;
  background: #f4f7f5;
  border: 1px solid #dbe6df;
  border-radius: 8px;
  cursor: pointer;
  display: none;
  height: 40px;
  justify-content: center;
  padding: 0;
  position: relative;
  width: 40px;
}

.menu-toggle span {
  background: #40534b;
  border-radius: 999px;
  display: block;
  height: 2px;
  position: absolute;
  width: 18px;
}

.menu-toggle span:nth-child(1) {
  transform: translateY(-6px);
}

.menu-toggle span:nth-child(3) {
  transform: translateY(6px);
}

.user-chip {
  background: #eef8f3;
  color: #167d53;
}

.content {
  padding: clamp(16px, 3vw, 28px);
}

.page-title {
  margin: 0 0 18px;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: 0;
}

.page-title-row {
  align-items: start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.page-title-row .page-title {
  margin-bottom: 6px;
}

.eyebrow {
  color: #167d53;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .12em;
  margin: 0 0 7px;
  text-transform: uppercase;
}

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

.card {
  background: #ffffff;
  border: 1px solid #dbe6df;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(16, 35, 28, 0.05);
  padding: 18px;
}

.panel {
  background: #ffffff;
  border: 1px solid #dbe6df;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(16, 35, 28, 0.05);
  overflow: hidden;
}

.panel-header {
  align-items: center;
  border-bottom: 1px solid #dbe6df;
  display: flex;
  justify-content: space-between;
  padding: 16px 18px;
}

.panel-title {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #edf2ef;
  font-size: 14px;
  padding: 14px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8faf9;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #fbfdfc;
}

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  background: #eef8f3;
  border-radius: 999px;
  color: #167d53;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
}

.badge.neutral {
  background: #f2f4f7;
  color: #667085;
}

.admin-form {
  display: grid;
  gap: 14px;
}

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

.field select,
.field textarea {
  border: 1px solid #cfd9d3;
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 12px;
}

.field textarea {
  min-height: 96px;
}

.field textarea.code-editor {
  min-height: 680px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
  tab-size: 2;
}

.inline-form .field {
  margin-top: 0;
}

.inline-form .button {
  margin-top: 0;
  width: auto;
}

.empty-state {
  color: #667085;
  padding: 18px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

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

.property-actions {
  min-width: 0;
}

.action-menu {
  position: relative;
  width: 112px;
}

.action-menu summary {
  background: #ffffff;
  border: 1px solid #dbe6df;
  border-radius: 8px;
  color: #40534b;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
  min-height: 34px;
  padding: 8px 10px;
}

.action-menu summary::-webkit-details-marker {
  display: none;
}

.action-menu[open] summary {
  border-color: #1f9d68;
  color: #167d53;
}

.action-menu-list {
  background: #ffffff;
  border: 1px solid #dbe6df;
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(16, 35, 28, 0.14);
  display: grid;
  gap: 6px;
  min-width: 170px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 12;
}

.action-menu-list .icon-button,
.action-menu-list form {
  width: 100%;
}

.action-menu-list .icon-button {
  justify-content: center;
}

.table-toolbar {
  align-items: end;
  border-bottom: 1px solid #dbe6df;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 16px 18px;
}

.filter-grid {
  align-items: end;
  border-bottom: 1px solid #dbe6df;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1.4fr) repeat(5, minmax(130px, 1fr)) auto;
  padding: 18px 22px;
}

.filter-grid .field {
  margin-top: 0;
}

.filter-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.filter-actions .button {
  margin-top: 0;
  width: auto;
}

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

.icon-button {
  background: #ffffff;
  align-items: center;
  border: 1px solid #dbe6df;
  border-radius: 8px;
  color: #40534b;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  min-height: 34px;
  padding: 7px 9px;
  white-space: nowrap;
}

button.icon-button {
  cursor: pointer;
  font-family: inherit;
}

.icon-button svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 16px;
}

.icon-button:hover {
  border-color: #1f9d68;
  color: #167d53;
}

.icon-button.primary {
  background: #1f9d68;
  border-color: #1f9d68;
  color: #ffffff;
}

.icon-button.danger:hover {
  border-color: #dc2626;
  color: #dc2626;
}

.metric {
  color: #667085;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric-value {
  color: #10231c;
  font-size: 32px;
  font-weight: 800;
  margin-top: 8px;
}

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

.login-card {
  background: #ffffff;
  border: 1px solid #dbe6df;
  border-radius: 8px;
  margin-inline: auto;
  max-width: 420px;
  padding: 24px;
  width: 100%;
}

.field {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.field input {
  border: 1px solid #cfd9d3;
  border-radius: 8px;
  height: 42px;
  padding: 0 12px;
}

.field-help {
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.ui-content-list-editor {
  border-top: 1px solid #edf2ef;
  display: grid;
  gap: 12px;
  padding-top: 18px;
}

.ui-content-list-heading {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.ui-content-list-heading h3,
.ui-content-item-card h4,
.ui-content-nested-list h4 {
  color: #172026;
  margin: 0;
}

.ui-content-list-heading h3 {
  font-size: 15px;
}

.ui-content-list-heading .muted-text {
  margin: 4px 0 0;
}

.ui-content-item-card {
  background: #fbfdfc;
  border: 1px solid #dbe6df;
  border-radius: 8px;
  padding: 14px;
}

.ui-content-item-card h4 {
  font-size: 13px;
  margin-bottom: 4px;
}

.ui-content-item-card .field {
  margin-top: 8px;
}

.ui-content-nested-list {
  border: 1px dashed #cfd9d3;
  border-radius: 8px;
  grid-column: 1 / -1;
  padding: 12px;
}

.ui-content-nested-list h4 {
  font-size: 12px;
  margin-bottom: 4px;
}

.button {
  background: #1f9d68;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  height: 42px;
  margin-top: 18px;
  width: 100%;
}

.danger-button {
  background: #dc2626;
}

.muted-text {
  color: #667085;
  line-height: 1.6;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-link {
  background: #1f9d68;
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
}

.button-link.secondary {
  background: #172026;
}

.form-section {
  border-bottom: 1px solid #edf2ef;
  display: grid;
  gap: 12px;
  padding: 20px 24px;
}

.form-section h3 {
  font-size: 15px;
  margin: 0;
}

.section-heading-row {
  align-items: start;
  display: flex;
  justify-content: space-between;
}

.property-form {
  gap: 0;
}

.property-form .checkbox-grid,
.property-form > .button {
  margin: 20px 24px;
}

.contact-preset {
  align-items: center;
  background: #f8faf9;
  border: 1px solid #dbe6df;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
}

.media-upload-form {
  align-items: end;
  background: #f8faf9;
  border: 1px solid #dbe6df;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 160px;
  padding: 12px;
}

.media-form-section {
  background: #fbfdfc;
}

.media-form-section .section-heading-row {
  border-bottom: 1px solid #edf2ef;
  padding-bottom: 4px;
}

.media-form-section .empty-state {
  padding: 0;
}

.media-upload-form .field,
.media-upload-form .button,
.field.compact {
  margin-top: 0;
}

.media-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.campaign-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 240px;
}

.campaign-row-actions form {
  margin: 0;
}

.review-note-input {
  border: 1px solid #dbe6df;
  border-radius: 8px;
  font: inherit;
  min-height: 34px;
  min-width: 150px;
  padding: 7px 9px;
}

.campaign-editor-footer {
  align-items: center;
  border-top: 1px solid #dbe6df;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 16px 24px;
}

.campaign-editor-footer .row-actions,
.campaign-editor-footer form {
  margin: 0;
}

.campaign-cover-preview {
  align-items: center;
  background: #f8faf9;
  border: 1px dashed #b8c9bf;
  border-radius: 10px;
  color: #667085;
  display: grid;
  min-height: 180px;
  overflow: hidden;
  place-items: center;
  text-align: center;
}

.campaign-cover-preview img {
  aspect-ratio: 16 / 7;
  display: block;
  height: 100%;
  max-height: 300px;
  object-fit: cover;
  width: 100%;
}

.internal-link-candidates {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 430px;
  overflow: auto;
  padding: 2px;
}

.internal-link-candidate {
  background: #ffffff;
  border: 1px solid #dbe6df;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  gap: 5px;
  padding: 12px;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.internal-link-candidate:hover,
.internal-link-candidate.is-selected {
  border-color: #1f9d68;
  box-shadow: 0 8px 20px rgba(31, 157, 104, .12);
  transform: translateY(-1px);
}

.internal-link-candidate-type {
  color: #167d53;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.internal-link-candidate strong {
  font-size: 13px;
  line-height: 1.45;
}

.internal-link-candidate small {
  color: #667085;
  overflow-wrap: anywhere;
}

.internal-link-candidate-action {
  color: #167d53;
  font-size: 12px;
  font-weight: 800;
  margin-top: 3px;
}

.internal-link-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
}

.internal-link-chip {
  align-items: center;
  background: #eef8f3;
  border: 1px solid #c9e7d7;
  border-radius: 999px;
  color: #167d53;
  display: inline-flex;
  font-size: 12px;
  font-weight: 750;
  gap: 6px;
  max-width: 100%;
  padding: 6px 8px 6px 10px;
}

.internal-link-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.internal-link-chip button {
  background: transparent;
  border: 0;
  color: #167d53;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}

.media-tile {
  background: #ffffff;
  border: 1px solid #dbe6df;
  border-radius: 8px;
  overflow: hidden;
}

.media-tile img {
  aspect-ratio: 4 / 3;
  background: #eef8f3;
  display: block;
  object-fit: cover;
  width: 100%;
}

.media-tile-body {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.media-library {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.media-name {
  overflow-wrap: anywhere;
}

.media-url {
  background: #f8faf9;
  border: 1px solid #dbe6df;
  border-radius: 8px;
  color: #40534b;
  font-size: 12px;
  overflow-wrap: anywhere;
  padding: 8px;
}

.admin-media-picker {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(16, 35, 28, 0.28);
  max-width: min(980px, calc(100vw - 28px));
  padding: 0;
  width: 100%;
}

.admin-media-picker::backdrop {
  background: rgba(16, 35, 28, 0.45);
}

.admin-media-picker-body {
  background: #ffffff;
  display: grid;
  gap: 14px;
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  padding: 18px;
}

.admin-media-picker-header,
.admin-media-picker-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.admin-media-picker-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.admin-media-picker-item {
  background: #ffffff;
  border: 1px solid #dbe6df;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  text-align: left;
}

.admin-media-picker-item:hover {
  border-color: #1f9d68;
}

.admin-media-picker-item img {
  aspect-ratio: 4 / 3;
  background: #eef8f3;
  display: block;
  object-fit: cover;
  width: 100%;
}

.admin-media-picker-item span {
  color: #40534b;
  display: block;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  padding: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tox-tinymce {
  border-radius: 8px !important;
}

.admin-crop-dialog {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(16, 35, 28, 0.28);
  max-width: min(980px, calc(100vw - 28px));
  padding: 0;
  width: 100%;
}

.admin-crop-dialog::backdrop {
  background: rgba(16, 35, 28, 0.45);
}

.admin-crop-dialog-body {
  background: #ffffff;
  display: grid;
  gap: 14px;
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  padding: 18px;
}

.admin-crop-frame {
  background: #10231c;
  border-radius: 8px;
  max-height: 560px;
  overflow: hidden;
}

.admin-crop-frame img {
  display: block;
  max-height: 560px;
  max-width: 100%;
}

.cropper-container {
  direction: ltr;
  font-size: 0;
  line-height: 0;
  position: relative;
  touch-action: none;
  user-select: none;
}

.cropper-container img {
  display: block;
  height: 100%;
  image-orientation: 0deg;
  max-height: none !important;
  max-width: none !important;
  min-height: 0 !important;
  min-width: 0 !important;
  width: 100%;
}

.cropper-wrap-box,
.cropper-canvas,
.cropper-drag-box,
.cropper-crop-box,
.cropper-modal {
  bottom: 0;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.cropper-wrap-box,
.cropper-canvas {
  overflow: hidden;
}

.cropper-drag-box {
  background-color: #ffffff;
  opacity: 0;
}

.cropper-modal {
  background-color: #000000;
  opacity: 0.5;
}

.cropper-view-box {
  display: block;
  height: 100%;
  outline: 1px solid #1f9d68;
  outline-color: rgba(31, 157, 104, 0.75);
  overflow: hidden;
  width: 100%;
}

.cropper-dashed {
  border: 0 dashed #eeeeee;
  display: block;
  opacity: 0.5;
  position: absolute;
}

.cropper-dashed.dashed-h {
  border-bottom-width: 1px;
  border-top-width: 1px;
  height: calc(100% / 3);
  left: 0;
  top: calc(100% / 3);
  width: 100%;
}

.cropper-dashed.dashed-v {
  border-left-width: 1px;
  border-right-width: 1px;
  height: 100%;
  left: calc(100% / 3);
  top: 0;
  width: calc(100% / 3);
}

.cropper-center,
.cropper-face,
.cropper-line,
.cropper-point {
  display: block;
  position: absolute;
}

.cropper-face {
  background-color: #ffffff;
  height: 100%;
  left: 0;
  opacity: 0.1;
  top: 0;
  width: 100%;
}

.cropper-line {
  background-color: #1f9d68;
  opacity: 0.1;
}

.cropper-line.line-e {
  cursor: ew-resize;
  height: 100%;
  right: -3px;
  top: 0;
  width: 5px;
}

.cropper-line.line-n {
  cursor: ns-resize;
  height: 5px;
  left: 0;
  top: -3px;
  width: 100%;
}

.cropper-line.line-w {
  cursor: ew-resize;
  height: 100%;
  left: -3px;
  top: 0;
  width: 5px;
}

.cropper-line.line-s {
  bottom: -3px;
  cursor: ns-resize;
  height: 5px;
  left: 0;
  width: 100%;
}

.cropper-point {
  background-color: #1f9d68;
  height: 8px;
  opacity: 0.75;
  width: 8px;
}

.cropper-point.point-e {
  cursor: ew-resize;
  margin-top: -4px;
  right: -4px;
  top: 50%;
}

.cropper-point.point-n {
  cursor: ns-resize;
  left: 50%;
  margin-left: -4px;
  top: -4px;
}

.cropper-point.point-w {
  cursor: ew-resize;
  left: -4px;
  margin-top: -4px;
  top: 50%;
}

.cropper-point.point-s {
  bottom: -4px;
  cursor: ns-resize;
  left: 50%;
  margin-left: -4px;
}

.cropper-point.point-ne {
  cursor: nesw-resize;
  right: -4px;
  top: -4px;
}

.cropper-point.point-nw {
  cursor: nwse-resize;
  left: -4px;
  top: -4px;
}

.cropper-point.point-sw {
  bottom: -4px;
  cursor: nesw-resize;
  left: -4px;
}

.cropper-point.point-se {
  bottom: -4px;
  cursor: nwse-resize;
  right: -4px;
}

.cropper-hidden {
  display: none !important;
}

.cropper-invisible {
  opacity: 0;
}

.cropper-bg {
  background-image:
    linear-gradient(45deg, #eeeeee 25%, transparent 25%),
    linear-gradient(-45deg, #eeeeee 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eeeeee 75%),
    linear-gradient(-45deg, transparent 75%, #eeeeee 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.media-sort-button {
  max-width: 180px;
}

.coordinate-map {
  background:
    linear-gradient(135deg, rgba(31, 157, 104, 0.12), rgba(36, 99, 235, 0.06)),
    #f8faf9;
  border: 1px solid #9fb4aa;
  border-radius: 8px;
  color: #667085;
  cursor: crosshair;
  font-size: 13px;
  min-height: 420px;
  overflow: hidden;
  position: relative;
}

.coordinate-map-vietnam {
  background: rgba(31, 157, 104, 0.14);
  border: 2px solid rgba(31, 157, 104, 0.42);
  border-radius: 55% 45% 52% 48% / 28% 35% 65% 72%;
  bottom: 46px;
  left: 42%;
  position: absolute;
  top: 34px;
  transform: rotate(10deg);
  width: 22%;
}

.coordinate-map-city {
  background: #ffffff;
  border: 1px solid #b8c8bf;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(16, 35, 28, 0.12);
  color: #10231c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
  position: absolute;
  z-index: 3;
}

.coordinate-map-city:hover {
  border-color: #1f9d68;
  color: #167d53;
}

.coordinate-map-city.hanoi {
  left: 47%;
  top: 14%;
}

.coordinate-map-city.danang {
  left: 55%;
  top: 42%;
}

.coordinate-map-city.nhatrang {
  left: 60%;
  top: 61%;
}

.coordinate-map-city.hcm {
  left: 50%;
  top: 76%;
}

.coordinate-map-grid {
  background-image:
    linear-gradient(rgba(102, 112, 133, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 112, 133, 0.12) 1px, transparent 1px);
  background-size: 10% 20%;
  inset: 0;
  position: absolute;
}

.coordinate-map-marker {
  background: #dc2626;
  border: 3px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(16, 35, 28, 0.24);
  display: none;
  height: 18px;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 18px;
  z-index: 2;
}

.coordinate-map.has-marker .coordinate-map-marker {
  display: block;
}

.coordinate-map-label {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #dbe6df;
  border-radius: 999px;
  color: #40534b;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  position: absolute;
}

.coordinate-map-label.north {
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
}

.coordinate-map-label.south {
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.coordinate-map-label.west {
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.coordinate-map-label.east {
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.badge-list.compact {
  margin-top: 6px;
}

.notice {
  border-radius: 8px;
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 12px;
}

.notice.success {
  background: #eef8f3;
  border: 1px solid #bfe7d1;
  color: #145c40;
}

.notice.error {
  background: #fff4f2;
  border: 1px solid #ffc9c2;
  color: #9f1d1d;
}

.recovery-code-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.recovery-code-grid code {
  background: #10231c;
  border-radius: 8px;
  color: #ffffff;
  display: block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 10px 12px;
  text-align: center;
}

.checkbox-grid {
  border: 1px solid #dbe6df;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 14px;
}

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

.checkbox-grid legend {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  padding: 0 6px;
  text-transform: uppercase;
}

.checkbox-grid label {
  align-items: flex-start;
  background: #f8faf9;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 10px;
}

.checkbox-grid label span {
  color: #667085;
  font-size: 12px;
  grid-column: 2;
}

.qr-layout {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 220px minmax(0, 1fr);
  margin-bottom: 18px;
}

.qr-code {
  background: #ffffff;
  border: 1px solid #dbe6df;
  border-radius: 8px;
  display: block;
  padding: 10px;
  width: 220px;
}

@media (max-width: 1040px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    bottom: 0;
    box-shadow: 20px 0 50px rgba(16, 35, 28, 0.24);
    left: 0;
    max-width: min(320px, 88vw);
    min-height: 100vh;
    overflow-y: auto;
    position: fixed;
    top: 0;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    width: 100%;
    z-index: 30;
  }

  body.sidebar-open::after {
    background: rgba(16, 35, 28, 0.45);
    content: '';
    inset: 0;
    position: fixed;
    z-index: 20;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .brand {
    margin-bottom: 14px;
  }

  .nav {
    display: grid;
    gap: 18px;
  }

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

  .nav-label {
    display: block;
  }

  .nav a {
    white-space: nowrap;
  }
}

@media (max-width: 1280px) {
  .filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  .topbar-title,
  .topbar-actions {
    width: 100%;
  }

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

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

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

  .checkbox-grid,
  .checkbox-grid.wide,
  .media-grid,
  .admin-media-picker-grid,
  .recovery-code-grid,
  .qr-layout {
    grid-template-columns: 1fr;
  }

  .icon-button span {
    display: none;
  }

  .icon-button {
    min-width: 36px;
    justify-content: center;
  }

  .table-toolbar,
  .filter-grid,
  .inline-form {
    grid-template-columns: 1fr;
  }

  .action-menu-list {
    left: 0;
    right: auto;
  }

  .inline-form .button {
    width: 100%;
  }

  .media-upload-form {
    grid-template-columns: 1fr;
  }

  .page-title-row {
    flex-direction: column;
  }

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

@media (max-width: 520px) {
  .content {
    padding: 14px;
  }

  .card,
  .login-card {
    padding: 14px;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .topbar-link,
  .user-chip {
    border-radius: 8px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .button-row,
  .page-actions,
  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .user-chip,
  .logout-form,
  .logout-button {
    width: 100%;
  }

  .qr-code {
    max-width: 100%;
    width: 100%;
  }

  .internal-link-candidates {
    grid-template-columns: 1fr;
  }
}

/* GĐ8 - AI Operations */
.advanced-ai-hero {
  align-items: center;
  background: radial-gradient(circle at 80% 20%, rgba(31,157,104,.16), transparent 36%), #ffffff;
  border: 1px solid #dbe6df;
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(16,35,28,.06);
  margin-bottom: 18px;
  padding: clamp(18px, 4vw, 32px);
}

.advanced-ai-hero .page-title { margin-bottom: 8px; }
.advanced-ai-hero-mark { align-items: center; background: #10231c; border-radius: 20px; color: #ffffff; display: grid; min-height: 110px; min-width: 130px; padding: 16px; place-items: center; text-align: center; }
.advanced-ai-hero-mark span { color: #6ce4a9; font-size: 40px; font-weight: 900; line-height: 1; }
.advanced-ai-hero-mark small { color: #c9dcd3; font-size: 11px; margin-top: 6px; }
.advanced-ai-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.advanced-ai-panel { margin-top: 18px; }
.advanced-ai-two-col { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 18px; }
.advanced-ai-kpi-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); padding: 18px; }
.soft-form, .accent-form { border: 1px solid #e5eee8; border-radius: 12px; padding: 16px; }
.soft-form { background: #fbfdfc; }
.accent-form { background: linear-gradient(145deg, #effaf3, #ffffff); border-color: #b9e5ca; }
.soft-form h3, .accent-form h3 { font-size: 15px; margin: 0 0 14px; }
.advanced-table { border-top: 1px solid #edf2ef; margin-top: 2px; }
.advanced-table table { min-width: 760px; }
.advanced-table td { vertical-align: top; }
.advanced-details { border-top: 1px solid #edf2ef; padding: 16px 18px; }
.advanced-details summary { color: #167d53; cursor: pointer; font-size: 13px; font-weight: 800; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.data-chip { background: #f4f8f5; border: 1px solid #dbe6df; border-radius: 999px; color: #40534b; font-size: 12px; padding: 7px 10px; }
.score-value { color: #167d53; font-size: 19px; }
.social-preview { line-height: 1.55; max-width: 330px; white-space: normal; }
.empty-cell { color: #8a9892; padding: 24px 18px !important; text-align: center; }
.inline-form { align-items: center; display: flex; gap: 6px; min-width: 190px; }
.inline-form select { min-width: 0; }
.compact-button { display: inline-flex; font-size: 12px; padding: 7px 10px; }
.text-link { color: #167d53; font-weight: 700; }
.badge.success { background: #e9f9ef; border-color: #b9e5ca; color: #137548; }
.badge.danger { background: #fff1f0; border-color: #f1c7c4; color: #b42318; }

@media (max-width: 980px) {
  .advanced-ai-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .advanced-ai-two-col, .advanced-ai-kpi-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .advanced-ai-hero { align-items: flex-start; flex-direction: column; }
  .advanced-ai-hero-mark { align-self: stretch; min-height: 80px; min-width: 0; }
  .advanced-ai-metrics { grid-template-columns: 1fr; }
  .advanced-ai-two-col { padding: 12px; }
  .advanced-ai-kpi-grid { padding: 12px; }
  .inline-form { align-items: stretch; display: grid; min-width: 0; }
}

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

.scheduler-control-panel {
  background: linear-gradient(135deg, #f7fcf8 0%, #ffffff 65%);
}

.scheduler-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1.8fr) repeat(4, minmax(100px, .7fr)) minmax(145px, 1fr);
  padding: 0 22px 18px;
}

.scheduler-form .field,
.scheduler-month-form .field {
  margin-top: 0;
}

.scheduler-form .button,
.scheduler-month-form .button {
  margin-top: 0;
  width: 100%;
}

.scheduler-connector-status {
  align-self: start;
}

.scheduler-connector-note {
  align-items: center;
  border-top: 1px solid #e5efe8;
  color: #667085;
  display: flex;
  font-size: 13px;
  gap: 8px;
  line-height: 1.5;
  padding: 14px 22px 18px;
}

.status-dot {
  background: #cbd5d0;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 8px;
  height: 8px;
  width: 8px;
}

.status-dot.is-live {
  background: #1f9d68;
  box-shadow: 0 0 0 4px rgba(31, 157, 104, .12);
}

.scheduler-calendar-toolbar {
  align-items: end;
  border-bottom: 1px solid #e5efe8;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px 22px;
}

.scheduler-month-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: 150px 150px 110px;
  min-width: 450px;
}

.scheduler-weekdays,
.scheduler-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.scheduler-weekdays {
  background: #f8faf9;
  border-bottom: 1px solid #e5efe8;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  gap: 1px;
  padding: 10px 12px;
  text-align: center;
  text-transform: uppercase;
}

.scheduler-calendar-grid {
  background: #e5efe8;
  gap: 1px;
}

.scheduler-day {
  background: #ffffff;
  min-height: 168px;
  min-width: 0;
  padding: 10px;
}

.scheduler-day.is-outside {
  background: #f7faf8;
}

.scheduler-day-number {
  color: #40534b;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.scheduler-day-events {
  display: grid;
  gap: 8px;
}

.scheduler-day-empty {
  color: #b0bbb5;
  font-size: 12px;
}

.scheduler-event {
  background: #f8fcf9;
  border: 1px solid #dcece2;
  border-left: 3px solid #9bcdb2;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 8px;
}

.scheduler-event-scheduled {
  border-left-color: #2b8aef;
}

.scheduler-event-failed {
  background: #fff8f8;
  border-color: #f4d1d1;
  border-left-color: #dc2626;
}

.scheduler-event-published {
  border-left-color: #1f9d68;
}

.scheduler-event-time,
.scheduler-event-reason,
.scheduler-event-error {
  color: #667085;
  font-size: 11px;
  line-height: 1.4;
  margin: 0;
}

.scheduler-event-title {
  color: #172026;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.scheduler-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.scheduler-badge {
  font-size: 10px;
  padding: 3px 6px;
}

.scheduler-pending {
  background: #fff7e6;
  color: #9a6700;
}

.scheduler-queued {
  background: #edf5ff;
  color: #2563a8;
}

.scheduler-processing {
  background: #f2ecff;
  color: #6941c6;
}

.scheduler-failed {
  background: #fff0f0;
  color: #b42318;
}

.scheduler-skipped {
  background: #f2f4f7;
  color: #667085;
}

.scheduler-event-error {
  color: #b42318;
}

.scheduler-event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.scheduler-action-form {
  display: inline-flex;
}

.scheduler-action-form .icon-button {
  font-size: 11px;
  min-height: 30px;
  padding: 5px 7px;
}

.scheduler-action-form .icon-button.danger {
  color: #b42318;
}

.scheduler-action-note {
  font-size: 11px;
}

@media (max-width: 1100px) {
  .scheduler-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scheduler-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .scheduler-form .field:first-child {
    grid-column: span 3;
  }

  .scheduler-month-form {
    min-width: 0;
  }
}

@media (max-width: 820px) {
  .scheduler-calendar-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .scheduler-month-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .scheduler-day {
    min-height: 130px;
    padding: 7px;
  }

  .scheduler-weekdays {
    font-size: 9px;
    padding-inline: 4px;
  }
}

@media (max-width: 520px) {
  .scheduler-metrics,
  .scheduler-form,
  .scheduler-month-form {
    grid-template-columns: 1fr;
  }

  .scheduler-form .field:first-child {
    grid-column: auto;
  }

  .scheduler-day {
    min-height: 96px;
    padding: 5px;
  }

  .scheduler-day-number {
    margin-bottom: 4px;
  }

  .scheduler-event {
    padding: 5px;
  }

  .scheduler-event-time,
  .scheduler-event-reason,
  .scheduler-event-error,
  .scheduler-event-meta {
    display: none;
  }

  .scheduler-event-actions {
    display: grid;
  }

  .scheduler-action-form,
  .scheduler-action-form .icon-button {
    width: 100%;
  }

  .scheduler-event-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .scheduler-badge {
    font-size: 9px;
  }
}

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

.crm-workspace {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  margin-top: 18px;
}

.crm-customer-sidebar,
.crm-profile-panel,
.crm-lead-queue,
.crm-bottom-grid > .panel {
  min-width: 0;
}

.crm-search-form,
.crm-create-form,
.crm-profile-form {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.crm-search-form .button,
.crm-create-form .button,
.crm-profile-form .button {
  margin-top: 4px;
}

.crm-customer-list {
  border-top: 1px solid #e5efe8;
  display: grid;
  max-height: 560px;
  overflow-y: auto;
}

.crm-customer-card {
  align-items: center;
  border-bottom: 1px solid #edf2ef;
  display: flex;
  gap: 10px;
  min-width: 0;
  padding: 13px 15px;
  transition: background .15s ease, border-color .15s ease;
}

.crm-customer-card:hover,
.crm-customer-card.is-selected {
  background: #f1fbf5;
  border-left: 3px solid #1f9d68;
  padding-left: 12px;
}

.crm-avatar {
  align-items: center;
  background: linear-gradient(135deg, #d9f4e4, #b9e7cd);
  border-radius: 50%;
  color: #167d53;
  display: flex;
  flex: 0 0 36px;
  font-size: 14px;
  font-weight: 800;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.crm-avatar-large {
  flex-basis: 52px;
  font-size: 20px;
  height: 52px;
  width: 52px;
}

.crm-customer-card-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.crm-customer-card-main strong,
.crm-customer-card-main span,
.crm-customer-card-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-customer-card-main strong {
  color: #172026;
  font-size: 13px;
}

.crm-customer-card-main span,
.crm-customer-card-main small {
  color: #667085;
  font-size: 11px;
}

.crm-chevron {
  color: #a4b1aa;
  font-size: 22px;
  margin-left: auto;
}

.crm-profile-panel {
  min-height: 620px;
  overflow: hidden;
}

.crm-empty-profile {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 560px;
  padding: 32px;
  text-align: center;
}

.crm-empty-icon {
  align-items: center;
  background: #ecf8f1;
  border-radius: 50%;
  color: #1f9d68;
  display: flex;
  font-size: 42px;
  height: 80px;
  justify-content: center;
  margin-bottom: 16px;
  width: 80px;
}

.crm-empty-profile h2 {
  margin: 0;
}

.crm-empty-profile p {
  max-width: 420px;
}

.crm-profile-header {
  align-items: center;
  background: linear-gradient(135deg, #f4fcf7, #ffffff);
  border-bottom: 1px solid #e5efe8;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 22px;
}

.crm-profile-identity {
  align-items: center;
  display: flex;
  gap: 13px;
  min-width: 0;
}

.crm-profile-identity h2 {
  font-size: 24px;
  margin: 2px 0 4px;
}

.crm-profile-identity p {
  margin: 0;
}

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

.crm-profile-block {
  border-bottom: 1px solid #e5efe8;
  min-width: 0;
  padding: 18px 22px;
}

.crm-profile-block h3 {
  color: #172026;
  font-size: 15px;
  margin: 0 0 5px;
}

.crm-profile-block > .muted-text,
.crm-profile-block .section-heading-row .muted-text {
  font-size: 13px;
  margin: 0 0 12px;
}

.crm-profile-form {
  padding: 0;
}

.crm-profile-form .field {
  margin-top: 6px;
}

.crm-profile-form .field textarea {
  min-height: 84px;
}

.crm-status-form,
.crm-assignment-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 180px;
}

.crm-status-form select,
.crm-assignment-form select {
  border: 1px solid #cfd9d3;
  border-radius: 7px;
  color: #40534b;
  min-height: 34px;
  min-width: 94px;
  padding: 5px 7px;
}

.crm-assignment-form select {
  flex: 1 1 150px;
}

.crm-status-form .icon-button,
.crm-assignment-form .icon-button {
  min-height: 34px;
}

.crm-lead-queue {
  margin-top: 18px;
}

.crm-queue-filter {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(180px, 1.5fr) 140px auto auto;
  margin-top: 14px;
}

.crm-queue-filter .field {
  margin-top: 0;
}

.check-field {
  align-items: center;
  display: flex;
  gap: 7px;
  min-height: 42px;
  white-space: nowrap;
}

.check-field input {
  height: 16px;
  width: 16px;
}

.crm-queue-filter .button {
  margin-top: 0;
  width: auto;
}

.crm-bottom-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  margin-top: 18px;
}

.crm-bottom-grid .panel-header {
  align-items: center;
}

.crm-notification-list {
  display: grid;
}

.crm-notification {
  align-items: start;
  border-top: 1px solid #edf2ef;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 13px 18px;
}

.crm-notification.is-unread {
  background: #f6fcf8;
  border-left: 3px solid #1f9d68;
  padding-left: 15px;
}

.crm-notification strong,
.crm-notification p,
.crm-notification small {
  display: block;
}

.crm-notification strong {
  color: #172026;
  font-size: 13px;
}

.crm-notification p,
.crm-notification small {
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
  margin: 3px 0 0;
}

.crm-timeline {
  border-left: 2px solid #d9ece0;
  display: grid;
  gap: 16px;
  margin: 16px 0 4px 8px;
  padding-left: 20px;
}

.crm-timeline-item {
  position: relative;
}

.crm-timeline-marker {
  background: #1f9d68;
  border: 4px solid #e8f7ee;
  border-radius: 50%;
  height: 14px;
  left: -29px;
  position: absolute;
  top: 3px;
  width: 14px;
}

.crm-timeline-content {
  background: #fbfdfc;
  border: 1px solid #e5efe8;
  border-radius: 9px;
  padding: 11px 13px;
}

.crm-timeline-heading {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.crm-timeline-content p,
.crm-timeline-content small {
  color: #667085;
  font-size: 12px;
  line-height: 1.6;
  margin: 7px 0 0;
}

.crm-timeline-content small {
  display: block;
  font-size: 11px;
}

@media (max-width: 1200px) {
  .crm-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-workspace {
    grid-template-columns: minmax(230px, 290px) minmax(0, 1fr);
  }

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

  .crm-queue-filter .button {
    width: 100%;
  }
}

@media (max-width: 820px) {
  .crm-workspace,
  .crm-bottom-grid,
  .crm-profile-grid {
    grid-template-columns: 1fr;
  }

  .crm-customer-list {
    max-height: 360px;
  }

  .crm-profile-panel {
    min-height: 0;
  }

  .crm-profile-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .crm-metrics,
  .crm-queue-filter {
    grid-template-columns: 1fr;
  }

  .crm-profile-header,
  .crm-profile-block {
    padding: 16px;
  }

  .crm-profile-identity h2 {
    font-size: 20px;
  }

  .crm-status-form,
  .crm-assignment-form {
    align-items: stretch;
    display: grid;
    min-width: 0;
  }

  .crm-status-form select,
  .crm-assignment-form select,
  .crm-status-form .icon-button,
  .crm-assignment-form .icon-button {
    width: 100%;
  }

  .crm-notification {
    flex-direction: column;
  }
}
