/*!
 * theme.css — design system theme QUẢN TRỊ (Agent_2 / CEMETERYCO v3).
 * Bám phong cách bản Figma "CMS QLNT Công viên Vĩnh Hằng". Màu trạng thái đồng bộ contract/enums.md.
 */
:root {
  --cmc-brand: #166534; /* xanh nghĩa trang/công viên */
  --cmc-brand-600: #15803d;
  --cmc-brand-50: #f0fdf4;
  --cmc-ink: #111827;
  --cmc-muted: #6b7280;
  --cmc-line: #e5e7eb;
  --cmc-bg: #f9fafb;
  --cmc-surface: #ffffff;
  --cmc-sidebar: #14342b; /* nền sidebar tối */
  --cmc-sidebar-ink: #d1fae5;
  --cmc-danger: #dc2626;
  --cmc-radius: 10px;
  --cmc-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  --cmc-sidebar-w: 256px;
  --cmc-topbar-h: 60px;
  font-family:
    system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--cmc-ink);
  background: var(--cmc-bg) !important;
  font-size: 0.875rem;
}
a {
  color: inherit;
  text-decoration: none;
}

/* ===== Khung shell quản trị ===== */
.cmc-shell {
  display: grid;
  grid-template-columns: var(--cmc-sidebar-w) 1fr;
  min-height: 100vh;
}

.cmc-sidebar {
  background: var(--cmc-sidebar);
  color: var(--cmc-sidebar-ink);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.cmc-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cmc-sidebar__brand .logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--cmc-brand);
  display: grid;
  place-items: center;
  color: #fff;
}
.cmc-nav {
  overflow-y: auto;
  padding: 10px 8px;
  flex: 1;
}
.cmc-nav__group {
  padding: 14px 12px 6px;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(209, 250, 229, 0.55);
}
.cmc-nav__item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--cmc-sidebar-ink);
  cursor: pointer;
}
.cmc-nav__item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.cmc-nav__item.is-active {
  background: var(--cmc-brand);
  color: #fff;
}
.cmc-nav__item svg {
  width: 18px;
  height: 18px;
}

.cmc-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cmc-topbar {
  height: var(--cmc-topbar-h);
  background: var(--cmc-surface);
  border-bottom: 1px solid var(--cmc-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.cmc-topbar__title {
  font-size: 1.125rem;
  font-weight: 650;
}
.cmc-topbar__right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cmc-user {
  display: flex;
  align-items: center;
  gap: 9px;
}
.cmc-user__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--cmc-brand-50);
  color: var(--cmc-brand);
  display: grid;
  place-items: center;
  font-weight: 700;
}
/* Dropdown tài khoản ở góc trên (đổi mật khẩu cá nhân) */
.cmc-user-menu {
  position: relative;
  display: flex;
  align-items: center;
}
.cmc-user-menu__toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  background: none;
  border: none;
  padding: 4px 6px;
  border-radius: 8px;
  cursor: pointer;
  color: inherit;
}
.cmc-user-menu__toggle:hover {
  background: var(--cmc-bg);
}
.cmc-user-menu__caret {
  width: 14px;
  height: 14px;
  color: var(--cmc-muted);
}
.cmc-user-menu__dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  min-width: 190px;
  background: var(--cmc-surface);
  border: 1px solid var(--cmc-line);
  border-radius: 10px;
  box-shadow: var(--cmc-shadow);
  padding: 6px;
  z-index: 60;
}
.cmc-user-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  background: none;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  color: var(--cmc-ink);
}
.cmc-user-menu__item:hover {
  background: var(--cmc-brand-50);
  color: var(--cmc-brand);
}
.cmc-content {
  padding: 22px;
}

/* ===== Thành phần ===== */
.cmc-card {
  background: var(--cmc-surface);
  border: 1px solid var(--cmc-line);
  border-radius: var(--cmc-radius);
  box-shadow: var(--cmc-shadow);
}
.cmc-card__body {
  padding: 18px;
}
.cmc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  font-weight: 600;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.cmc-btn:active {
  transform: translateY(0);
  box-shadow: none;
}
.cmc-btn--outline {
  border-color: rgba(0, 0, 0, 0.14);
  color: #374151;
  background: #fff;
}
.cmc-btn--outline:hover {
  background: #f9fafb;
}
.cmc-btn--primary {
  background: #1c4a35;
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border: none;
}
.cmc-btn--primary:hover {
  background: #163d2b;
}
.cmc-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.cmc-input,
.cmc-select,
.cmc-textarea {
  width: 100%;
  padding: 12px;
  font-size: 0.875rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  outline: none;
  transition: all 0.2s;
  box-shadow: none;
  height: 38px;
}
.cmc-textarea {
  min-height: 150px;
}
.cmc-select {
  background: #fff;
}
.cmc-input:focus,
.cmc-select:focus,
.cmc-textarea:focus {
  background: #fff;
  border-color: rgba(28, 74, 53, 0.3);
  box-shadow: 0 0 0 2px rgba(28, 74, 53, 0.2);
}
.cmc-input:disabled,
.cmc-select:disabled,
.cmc-textarea:disabled,
.select2-container--disabled .select2-selection {
  background-color: #f3f4f6 !important;
  color: #9ca3af !important;
  cursor: not-allowed !important;
  opacity: 0.8;
}
.cmc-field {
  margin-bottom: 14px;
}
.cmc-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  color: #4b5563;
}
.cmc-error {
  color: var(--cmc-danger);
  font-size: 0.875rem;
  margin-top: 6px;
}

/* Badge trạng thái — màu nền lấy từ JS theo enums (style="--c: #...") */
.cmc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--c, #6b7280) 80%, #000);
  background: color-mix(in srgb, var(--c, #6b7280) 15%, #fff);
}
.cmc-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, #6b7280);
}

/* ===== Trang đăng nhập ===== */
.cmc-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  padding: 20px;
}
.cmc-login__card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.12);
  padding: 32px;
}
.cmc-login__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-bottom: 6px;
}
.cmc-login__brand .logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--cmc-brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.cmc-login__title {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 8px 0 2px;
}
.cmc-login__sub {
  text-align: center;
  color: var(--cmc-muted);
  margin-bottom: 22px;
  font-size: 0.875rem;
}

/* ===== Toast ===== */
.cmc-toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* Phải cao hơn Bootstrap .modal (1050) + .modal-backdrop (1040) — nhiều màn (vd. chi tiết hợp đồng)
     dùng modal Bootstrap thật, toast tạo ra khi modal đang mở sẽ bị che khuất nếu z-index thấp hơn. */
  z-index: 1100;
}
.cmc-toast {
  min-width: 240px;
  max-width: 380px;
  padding: 12px 14px;
  border-radius: 10px;
  color: #fff;
  box-shadow: var(--cmc-shadow);
  font-size: 0.875rem;
  opacity: 1;
  transition:
    opacity 0.3s,
    transform 0.3s;
}
.cmc-toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
}
.cmc-toast--info {
  background: #2563eb;
}
.cmc-toast--success {
  background: #16a34a;
}
.cmc-toast--error {
  background: #dc2626;
}

/* ===== Bảng dữ liệu (Table) ===== */
.cmc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.cmc-table thead th {
  text-align: left;
  padding: 16px 12px 12px;
  border-bottom: 2px solid #f1f3f5;
  color: #6b7280;
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.cmc-table tbody td {
  padding: 16px 12px;
  border-bottom: 1px solid #f8fafc;
  vertical-align: middle;
  color: #111827;
}
.cmc-table tbody tr {
  transition:
    background-color 0.2s ease,
    transform 0.15s ease;
}
.cmc-table tbody tr:hover {
  background: #f0fdf4;
}
.cmc-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  align-items: center;
}
.col-md-8 {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.col-md-4 {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
@media (max-width: 900px) {
  .cmc-row {
    grid-template-columns: 1fr;
  }
  .col-md-4 {
    justify-content: flex-start;
  }
}
.cmc-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--cmc-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}
.cmc-icon-btn:hover {
  background: #f1f5f9;
  color: var(--cmc-brand);
  transform: scale(1.05);
}
.cmc-icon-btn svg {
  width: 16px;
  height: 16px;
}

/* ===== Tabs ===== */
.cmc-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--cmc-line);
  margin-bottom: 16px;
}
.cmc-tab {
  border: none;
  background: transparent;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--cmc-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.cmc-tab.is-active {
  color: var(--cmc-brand-600);
  border-bottom-color: var(--cmc-brand);
  font-weight: 600;
}

/* ===== Cây đơn vị ===== */
.cmc-tree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 4px;
  border-bottom: 1px solid #f1f3f5;
}

/* ===== Checkbox quyền ===== */
.cmc-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--cmc-line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
}
.cmc-check:hover {
  background: #fafafa;
}
.cmc-check code {
  margin-left: auto;
}

/* ===== Modal ===== */
.cmc-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}
.cmc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.cmc-modal__panel {
  position: relative;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 768px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
}
.cmc-modal__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #f3f4f6;
  flex-shrink: 0;
}
.cmc-modal__hd h2 {
  font-size: 0.875rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  font-family: "Playfair Display", serif;
}
.cmc-modal__body {
  overflow-y: auto;
  flex: 1;
  padding: 20px 24px;
}
.cmc-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.cmc-form-grid--full {
  grid-column: span 2 / span 2;
}
.cmc-modal-footer {
  grid-column: span 2 / span 2;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 8px;
}
[x-cloak] {
  display: none !important;
}

/* ===== Bản đồ (FE-03) ===== */
.cmc-mapscreen__grid {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 16px;
  align-items: stretch;
}
.cmc-mapscreen__side .cmc-card__body {
  padding: 14px;
}
.cmc-mapscreen__h {
  margin: 16px 0 8px;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--cmc-muted);
}
.cmc-mapscreen__h:first-child {
  margin-top: 0;
}
.cmc-mapscreen__search {
  display: grid;
  gap: 8px;
}
.cmc-mapscreen__legend {
  display: grid;
  gap: 6px;
}
.cmc-mapscreen__lg {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
}
.cmc-mapscreen__sw {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  display: inline-block;
}
.cmc-mapscreen__mapwrap {
  position: relative;
  padding: 0;
  overflow: hidden;
  min-height: 520px;
}
.cmc-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #eef2f0;
}
.cmc-map .ol-control button {
  background: var(--cmc-brand);
}
.cmc-map .ol-control button:hover {
  background: var(--cmc-brand-600);
}

/* Panel vị trí đang chọn (góc phải bản đồ) */
.cmc-mapscreen__sel {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 280px;
  background: #fff;
  border: 1px solid var(--cmc-line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.16);
  padding: 14px;
  z-index: 10;
}
.cmc-mapscreen__sel-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.cmc-mapscreen__sel-hd b {
  font-size: 1.125rem;
}
.cmc-mapscreen__sel-hd .cmc-icon-btn {
  margin-left: auto;
}
.cmc-mapscreen__sel-body {
  display: grid;
  gap: 5px;
  font-size: 0.875rem;
  color: var(--cmc-muted);
  margin-bottom: 12px;
}

/* Popup OpenLayers (overlay) */
.cmc-map-popup {
  position: relative;
  background: #fff;
  border: 1px solid var(--cmc-line);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.18);
  padding: 12px 14px;
  min-width: 210px;
  font-size: 0.875rem;
}
.cmc-map-popup::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: #fff;
}
.cmc-map-popup__hd {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-right: 16px;
}
.cmc-map-popup__hd b {
  font-size: 0.875rem;
}
.cmc-map-popup__row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 0;
}
.cmc-map-popup__row span {
  color: var(--cmc-muted);
}
.cmc-map-popup__x {
  position: absolute;
  top: 6px;
  right: 8px;
  border: none;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--cmc-muted);
}

@media (max-width: 900px) {
  .cmc-mapscreen__grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Kanban CRM (FE-02 / S4) ===== */
.cmc-kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  align-items: start;
}
.cmc-kanban__col {
  background: #f3f4f6;
  border: 1px solid var(--cmc-line);
  border-radius: 12px;
  padding: 10px;
  min-height: 120px;
}
.cmc-kanban__col.is-drop {
  background: var(--cmc-brand-50);
  border-color: var(--cmc-brand);
}
.cmc-kanban__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
.cmc-kanban__count {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--cmc-muted);
  background: #fff;
  border-radius: 999px;
  padding: 1px 9px;
}
.cmc-kanban__sum {
  font-size: 0.875rem;
  margin: 0 0 8px;
}
.cmc-kanban__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cmc-kanban__card {
  background: #fff;
  border: 1px solid var(--cmc-line);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: var(--cmc-shadow);
}
.cmc-kanban__card:hover {
  border-color: var(--cmc-brand);
}
.cmc-kanban__card[draggable="true"] {
  cursor: grab;
}
.cmc-kanban__card-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 4px;
}
.cmc-kanban__empty {
  text-align: center;
  color: #c4c8cd;
  padding: 14px 0;
  font-size: 0.875rem;
}

/* ===== Drawer (chi tiết) ===== */
.cmc-drawer {
  position: fixed;
  inset: 0;
  z-index: 110;
}
.cmc-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.cmc-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  max-width: 800px;
  background: #fff;
  box-shadow: -8px 0 30px rgba(16, 24, 40, 0.18);
  display: flex;
  flex-direction: column;
}
.cmc-drawer__hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--cmc-line);
}
.cmc-drawer__hd h3 {
  margin-bottom: 6px;
}
.cmc-drawer__hd .cmc-badge {
  margin-right: 6px;
}
.cmc-drawer__body {
  padding: 18px 20px;
  overflow: auto;
  flex: 1;
  height: calc(100vh - 145px);
}
.cmc-drawer__ft {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--cmc-line);
}

/* Danh sách định nghĩa (cặp nhãn-giá trị) */
.cmc-dl {
  display: grid;
  gap: 9px;
}
.cmc-dl > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.875rem;
}
.cmc-dl > div span {
  color: var(--cmc-muted);
}
.cmc-dl__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f3f5;
  font-size: 0.875rem;
}
.cmc-dl__row .cmc-muted {
  flex: 1;
}

/* Timeline trạng thái đơn */
.cmc-timeline {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.cmc-timeline__step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--cmc-muted);
  padding: 4px 8px;
}
.cmc-timeline__step:not(:last-child)::after {
  content: "→";
  margin-left: 8px;
  color: #c4c8cd;
}
.cmc-timeline__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d1d5db;
}
.cmc-timeline__step.is-done {
  color: var(--cmc-ink);
}
.cmc-timeline__step.is-done .cmc-timeline__dot,
.cmc-timeline__step.is-current .cmc-timeline__dot {
  background: var(--c, var(--cmc-brand));
}
.cmc-timeline__step.is-current {
  color: var(--cmc-ink);
  font-weight: 700;
}

@media (max-width: 900px) {
  .cmc-drawer__panel {
    max-width: 100%;
  }
}

/* ===== S5 Hợp đồng ===== */
.cmc-filter-bar {
  background: transparent;
  padding: 0;
}
.cmc-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.cmc-kpis.cmc-kpis--4 {
  grid-template-columns: repeat(4, 1fr);
}
.cmc-kpis--5 {
  grid-template-columns: repeat(5, 1fr);
}
.cmc-kpi {
  border-radius: 12px;
  padding: 16px;
  text-align: left;
  transition: all 0.2s;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cmc-kpi:hover {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.cmc-kpi--danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}
.cmc-kpi--warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}
.cmc-kpi--alert {
  border-color: #fef08a;
  background: #fefce8;
  color: #a16207;
}
.cmc-kpi--info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
}
.cmc-kpi--success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}
.cmc-kpi--primary {
  border-color: #e5e7eb;
  background: #f8fafc;
  color: #334155;
}
.cmc-kpi--secondary {
  border-color: #e2e8f0;
  background: #f1f5f9;
  color: #475569;
}
.cmc-kpi--purple {
  border-color: #e9d5ff;
  background: #faf5ff;
  color: #6b21a8;
}

.cmc-kpi.is-active {
  border-color: #1c4a35;
  box-shadow: 0 4px 12px rgba(28, 74, 53, 0.1);
}

.cmc-kpi__header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.cmc-kpi__header svg {
  width: 14px;
  height: 14px;
}
.cmc-kpi__label {
  font-size: 0.875rem;
  font-weight: 600;
}

.cmc-kpi__content {
  display: flex;
  align-items: baseline;
}
.cmc-kpi__value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}
.cmc-kpi__suffix {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-left: 6px;
}

.cmc-kpi--stats {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  align-items: center;
  text-align: center;
  justify-content: center;
  padding: 12px;
}
.cmc-kpi--stats .cmc-kpi__value {
  font-family: "Playfair Display", serif;
  font-size: 1.75rem;
  color: #1f2937;
}
.cmc-kpi--stats .cmc-kpi__label {
  font-size: 0.6875rem;
  font-weight: 400;
  color: #6b7280;
  margin-top: 2px;
  font-size: 0.75rem;
}

@media (max-width: 900px) {
  .cmc-kpis {
    grid-template-columns: 1fr 1fr;
  }
}

.cmc-progress {
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background-color: #f3f4f6;
  overflow: hidden;
  flex-shrink: 0;
}
.cmc-progress__bar {
  display: block;
  height: 100%;
  background-color: #1c4a35;
  border-radius: 9999px;
}

/* Filter & Table Tailwind Overrides */
.cmc-filter-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.cmc-search {
  position: relative;
}
.cmc-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  width: 14px;
  height: 14px;
}
.cmc-filter-card .cmc-input {
  padding: 8px 12px 8px 36px;
  font-size: 0.875rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  max-width: 400px;
  min-width: 250px;
  outline: none;
  transition: all 0.2s;
  box-shadow: none;
}
.cmc-filter-card .cmc-input:focus {
  border-color: rgba(28, 74, 53, 0.3);
  box-shadow: 0 0 0 2px rgba(28, 74, 53, 0.2);
}
.cmc-filter-card .cmc-select {
  padding: 8px 12px;
  font-size: 0.875rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  outline: none;
  transition: all 0.2s;
  box-shadow: none;
  width: auto;
}
.cmc-filter-card .cmc-select:focus {
  border-color: rgba(28, 74, 53, 0.3);
  box-shadow: 0 0 0 2px rgba(28, 74, 53, 0.2);
}
.cmc-filter-summary {
  margin-left: auto;
  font-size: 0.875rem;
  color: #9ca3af;
}

.cmc-table-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  width: 100%;
}
.cmc-table-container {
  overflow-x: auto;
}
.cmc-table-card .cmc-table {
  width: 100%;
  font-size: 0.875rem;
  text-align: left;
  border-collapse: collapse;
  margin: 0;
}
.cmc-table-card .cmc-table thead tr {
  border-bottom: 1px solid #f3f4f6;
  background: rgba(249, 250, 251, 0.6);
}
.cmc-table-card .cmc-table th {
  padding: 12px;
  text-align: left;
  font-size: 0.75rem;
  color: #9ca3af;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  white-space: nowrap;
  border: none;
}
.cmc-table-card .cmc-table tbody tr {
  border-bottom: 1px solid #f9fafb;
  transition: background-color 0.2s;
  cursor: pointer;
}
.cmc-table-card .cmc-table tbody tr:hover {
  background: rgba(249, 250, 251, 0.6);
}
.cmc-table-card .cmc-table td {
  padding: 12px;
  border: none;
  vertical-align: middle;
}

/* Typograghy inside Table */
.cmc-td-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875rem;
}
.cmc-td-muted {
  color: #9ca3af;
}
.cmc-td-main {
  font-weight: 600;
  color: #1f2937;
  white-space: pre-wrap;
  font-size: 0.875rem;
}
.cmc-td-sub {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 2px;
}
.cmc-text-success {
  color: #047857;
  font-weight: 600;
}
.cmc-text-danger {
  color: #b91c1c;
  font-weight: 600;
}

.cmc-badge--loai {
    font-size: 0.75rem;
    background: #f3f4f6;
    color: #4b5563;
    padding: 4px 10px;
    border-radius: 9999px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cmc-badge--loai::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #9ca3af;
}

.cmc-badge--pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.cmc-badge--pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cmc-status--green {
  background-color: #d1fae5 !important;
  color: #047857 !important;
}
.cmc-status--green::before {
  background-color: #10b981 !important;
}

.cmc-status--blue {
  background-color: #dbeafe !important;
  color: #1d4ed8 !important;
}
.cmc-status--blue::before {
  background-color: #3b82f6 !important;
}

.cmc-status--orange {
  background-color: #fef9c3 !important;
  color: #b45309 !important;
}
.cmc-status--orange::before {
  background-color: #f59e0b !important;
}

.cmc-status--red {
  background-color: #fee2e2 !important;
  color: #b91c1c !important;
}
.cmc-status--red::before {
  background-color: #ef4444 !important;
}

.cmc-status--purple {
  background-color: #f3e8ff !important;
  color: #7e22ce !important;
}
.cmc-status--purple::before {
  background-color: #a855f7 !important;
}

.cmc-status--teal {
  background-color: #ccfbf1 !important;
  color: #0f766e !important;
}
.cmc-status--teal::before {
  background-color: #14b8a6 !important;
}

.cmc-status--gray {
  background-color: #f3f4f6 !important;
  color: #4b5563 !important;
}
.cmc-status--gray::before {
  background-color: #6b7280 !important;
}

.cmc-type--emerald {
  background-color: #d1fae5 !important;
  color: #047857 !important;
}
.cmc-type--emerald::before {
  background-color: #10b981 !important;
}
.cmc-type--amber {
  background-color: #fef3c7 !important;
  color: #b45309 !important;
}
.cmc-type--amber::before {
  background-color: #f59e0b !important;
}
.cmc-type--cyan {
  background-color: #cffafe !important;
  color: #0f766e !important;
}
.cmc-type--cyan::before {
  background-color: #06b6d4 !important;
}
.cmc-type--indigo {
  background-color: #e0e7ff !important;
  color: #4338ca !important;
}
.cmc-type--indigo::before {
  background-color: #6366f1 !important;
}
.cmc-type--rose {
  background-color: #ffe4e6 !important;
  color: #be123c !important;
}
.cmc-type--rose::before {
  background-color: #f43f5e !important;
}
.cmc-type--blue {
  background-color: #dbeafe !important;
  color: #1d4ed8 !important;
}
.cmc-type--blue::before {
  background-color: #3b82f6 !important;
}

.cmc-table-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}
.cmc-action-btn {
  padding: 2px;
  color: #d1d5db;
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
  display: inline-flex;
}
.cmc-action-btn svg {
  width: 14px;
  height: 14px;
}
.cmc-action-btn:hover {
  color: #3b82f6;
  background: #eff6ff;
}
.cmc-action-btn--edit:hover {
  color: #10b981;
  background: #ecfdf5;
}
.cmc-action-btn--delete:hover {
  color: #ef4444;
  background: #fef2f2;
}

.cmc-table--compact {
  font-size: 0.875rem;
}
.cmc-table--compact thead th {
  padding: 7px 8px;
  text-transform: none;
  letter-spacing: 0;
}
.cmc-table--compact tbody td {
  padding: 6px 8px;
}
.cmc-table--compact tfoot td {
  padding: 8px;
  border-top: 1px solid var(--cmc-line);
}
.cmc-input--sm,
.cmc-select--sm {
  padding: 6px 8px;
  font-size: 0.875rem;
}

.cmc-modal__panel--wide {
  max-width: 1240px;
}
.cmc-drawer__panel--wide {
  max-width: 1000px;
}

.cmc-btn--danger {
  background: #dc2626;
  color: #fff;
  border: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.cmc-btn--danger:hover {
  background: #b91c1c;
}
.cmc-btn--warning {
  background: #f59e0b;
  color: #fff;
  border: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.cmc-btn--warning:hover {
  background: #d97706;
}

.cmc-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.cmc-history li {
  border-left: 2px solid var(--cmc-line);
  padding: 0 0 0 12px;
  font-size: 0.875rem;
}
.cmc-history li > div {
  margin-top: 2px;
}

/* ===== S6 Tài chính ===== */
.cmc-btn--sm {
  padding: 8px 12px;
  font-size: 0.875rem;
}
.cmc-qr {
  display: flex;
  gap: 14px;
  align-items: stretch;
}
.cmc-qr__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 150px;
  min-height: 150px;
  border: 1px dashed var(--cmc-line);
  border-radius: 10px;
  padding: 10px;
  color: var(--cmc-muted);
}
.cmc-qr__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  word-break: break-all;
  text-align: center;
  color: var(--cmc-ink);
}
.cmc-checklist {
  max-height: 200px;
  overflow: auto;
  border: 1px solid var(--cmc-line);
  border-radius: 8px;
  padding: 6px;
}
.cmc-checklist__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 0.875rem;
  border-radius: 6px;
  cursor: pointer;
}
.cmc-checklist__row:hover {
  background: #f7f8f9;
}

/* ===== S7 Vận hành: quy trình hồ sơ ===== */
.cmc-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.cmc-steps__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--cmc-line);
  border-radius: 8px;
  font-size: 0.875rem;
}
.cmc-steps__no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cmc-brand);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  flex: none;
}

/* ===== S9 Dashboard / Báo cáo / CMS ===== */
.cmc-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 3px;
}
.cmc-stack {
  display: flex;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  background: #eef0f2;
}
.cmc-stack__seg {
  height: 100%;
}
.cmc-expire {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--cmc-line);
  font-size: 0.875rem;
  color: var(--cmc-muted);
}
.cmc-expire__n {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--cmc-ink);
}
.cmc-expire--7 {
  background: #fef2f2;
  border-color: #f3c2c2;
}
.cmc-expire--30 {
  background: #fffbeb;
  border-color: #fde68a;
}
.cmc-expire--90 {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.cmc-mediagrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.cmc-mediacard {
  border: 1px solid var(--cmc-line);
  border-radius: 10px;
  padding: 10px;
}
.cmc-mediacard__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  background: #f3f4f6;
  border-radius: 8px;
  color: var(--cmc-muted);
  margin-bottom: 8px;
}
.cmc-mediacard__name {
  font-size: 0.875rem;
  font-weight: 600;
  word-break: break-all;
}

[hidden] {
  display: none !important;
}
.cmc-muted {
  color: var(--cmc-muted);
}
.cmc-placeholder {
  border: 1.5px dashed var(--cmc-line);
  border-radius: var(--cmc-radius);
  padding: 40px;
  text-align: center;
  color: var(--cmc-muted);
}

@media (max-width: 900px) {
  .cmc-shell.is-open {
    padding-left: 260px;
  }
}
.cmc-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.cmc-sidebar-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}
@media (max-width: 900px) {
  .cmc-shell {
    padding-left: 0;
  }
  .cmc-sidebar {
    transform: translateX(-100%);
  }
}

/* ===== 3. Layout: Row & Grid ===== */
.cmc-row {
  display: flex;
  flex-wrap: wrap;
  margin: -8px;
}
.col-md-8 {
  flex: 0 0 66.666%;
  max-width: 66.666%;
  padding: 8px;
  box-sizing: border-box;
}
.col-md-4 {
  flex: 0 0 33.333%;
  max-width: 33.333%;
  padding: 8px;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  .col-md-8,
  .col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

.cmc-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}
.cmc-page-title h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  line-height: 1.25;
}
.cmc-page-title p {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 4px 0 0 0;
}
.cmc-page-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== S10 — Accessibility (a11y) ===== */
/* Bỏ qua điều hướng → nhảy thẳng tới nội dung chính (hiện khi focus bằng bàn phím). */
.cmc-skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 2000;
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--cmc-brand);
  color: #fff;
  font-weight: 600;
  transition: top 0.15s;
}
.cmc-skip-link:focus {
  top: 8px;
  outline: 3px solid #fff;
}
/* Focus thấy rõ cho thao tác bàn phím (không ảnh hưởng click chuột nhờ :focus-visible). */
a:focus-visible,
button:focus-visible,
.cmc-btn:focus-visible,
.cmc-nav__item:focus-visible,
.cmc-tab:focus-visible,
.cmc-icon-btn:focus-visible,
.cmc-check:focus-visible,
[tabindex]:focus-visible,
.cmc-input:focus-visible,
.cmc-select:focus-visible {
  outline: 2px solid var(--cmc-brand);
  outline-offset: 2px;
  border-radius: 6px;
}
.cmc-content:focus {
  outline: none;
}
/* Tôn trọng "giảm chuyển động" của hệ điều hành. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
/* Chỉ đọc cho trình đọc màn hình (ẩn về mặt thị giác). */
.cmc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== S10 — Responsive / màn hình hiện trường (mobile/tablet) ===== */
/* Lớp phủ nền khi mở sidebar trên màn hình nhỏ — chạm để đóng. */
.cmc-sidebar-backdrop {
  display: none;
}
.cmc-menu-toggle {
  display: none;
}

@media (max-width: 900px) {
  .cmc-menu-toggle {
    display: inline-flex;
  }
  .cmc-sidebar-backdrop.is-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 49;
    background: rgba(17, 24, 39, 0.45);
  }
  .cmc-topbar {
    padding: 0 14px;
  }
  .cmc-topbar__title {
    font-size: 1.125rem;
  }
  .cmc-content {
    padding: 14px;
  }
  /* Bảng rộng cuộn ngang trong thân thẻ thay vì tràn vỡ layout. */
  .cmc-card__body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* Vùng chạm tối thiểu ~40px cho nút biểu tượng (ngón tay hiện trường). */
  .cmc-icon-btn {
    padding: 9px;
  }
  .cmc-icon-btn svg {
    width: 18px;
    height: 18px;
  }
}
/* Tiện ích: bọc bảng cần cuộn ngang chủ động. */
.cmc-tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 600px) {
  .cmc-kpis {
    grid-template-columns: 1fr;
  }
  .cmc-modal__panel {
    margin: 10px;
    max-height: 95vh;
  }
  .cmc-modal__panel--wide {
    max-width: 100%;
  }
  .cmc-form-grid {
    grid-template-columns: 1fr;
  }
  .cmc-form-grid--full,
  .cmc-modal-footer {
    grid-column: 1 / -1;
  }
  .cmc-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .cmc-tab {
    white-space: nowrap;
  }
}

/* ===== Cài đặt hệ thống (_Settings) ===== */
.cmc-deflist {
  margin: 0;
  display: grid;
  gap: 8px;
}
.cmc-deflist > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.cmc-deflist dt {
  margin: 0;
  color: var(--cmc-muted);
  font-size: 0.875rem;
}
.cmc-deflist dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}
.cmc-integration-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--cmc-border);
}
.cmc-integration-row:first-of-type {
  border-top: 0;
}
/* Mật độ bảng gọn (tùy chọn ở Cài đặt → Giao diện). */
[data-density="compact"] .cmc-table th,
[data-density="compact"] .cmc-table td {
  padding-top: 5px;
  padding-bottom: 5px;
}

/* ===== Danh sách chọn loại danh mục (_Catalog cột trái) — nền sáng, KHÔNG dùng cmc-nav__item (vốn cho sidebar tối) ===== */
.cmc-catalog__item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--cmc-ink);
  cursor: pointer;
  font-size: 0.875rem;
  text-align: left;
}
.cmc-catalog__item:hover {
  background: #f3f4f6;
}
.cmc-catalog__item.is-active {
  background: var(--cmc-brand);
  color: #fff;
  font-weight: 600;
}
.cmc-catalog__item svg {
  width: 18px;
  height: 18px;
}

/* === DASHBOARD === */
/* KPI */
.dash-kpi-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.dash-kpi-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.dash-kpi-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.dash-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dash-kpi-icon svg {
  width: 24px;
  height: 24px;
}
.dash-badge-trend {
  font-size: 12px;
  font-weight: 600;
  background: #ecfdf5;
  color: #059669;
  padding: 3px 8px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.dash-kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  font-family: "Playfair Display", serif;
  line-height: 1.2;
}
.dash-kpi-label {
  font-size: 14px;
  color: #6b7280;
  margin-top: 2px;
}
.dash-kpi-sub {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* KPI Card Colors */
.dash-kpi-card--primary {
  background: #fff;
  border-color: #dcfce7;
}
.dash-kpi-card--primary .dash-kpi-icon {
  background: #15803d;
  color: #fff;
}
.dash-kpi-card--primary .dash-kpi-value {
  color: #166534;
}
.dash-kpi-card--primary .dash-kpi-label {
  color: #166534;
  opacity: 0.8;
}
.dash-kpi-card--primary .dash-kpi-sub {
  color: #166534;
  opacity: 0.6;
  border-top-color: rgba(22, 101, 52, 0.1);
}

.dash-kpi-card--secondary {
  background: #fff;
  border-color: #fef08a;
}
.dash-kpi-card--secondary .dash-kpi-icon {
  background: #a16207;
  color: #fff;
}
.dash-kpi-card--secondary .dash-kpi-value {
  color: #854d0e;
}
.dash-kpi-card--secondary .dash-kpi-label {
  color: #854d0e;
  opacity: 0.8;
}
.dash-kpi-card--secondary .dash-kpi-sub {
  color: #854d0e;
  opacity: 0.6;
  border-top-color: rgba(133, 77, 14, 0.1);
}

.dash-kpi-card--purple {
  background: #fff;
  border-color: #e9d5ff;
}
.dash-kpi-card--purple .dash-kpi-icon {
  background: #7e22ce;
  color: #fff;
}
.dash-kpi-card--purple .dash-kpi-value {
  color: #6b21a8;
}
.dash-kpi-card--purple .dash-kpi-label {
  color: #6b21a8;
  opacity: 0.8;
}
.dash-kpi-card--purple .dash-kpi-sub {
  color: #6b21a8;
  opacity: 0.6;
  border-top-color: rgba(107, 33, 168, 0.1);
}

.dash-kpi-card--cyan {
  background: #fff;
  border-color: #cffafe;
}
.dash-kpi-card--cyan .dash-kpi-icon {
  background: #0e7490;
  color: #fff;
}
.dash-kpi-card--cyan .dash-kpi-value {
  color: #155e75;
}
.dash-kpi-card--cyan .dash-kpi-label {
  color: #155e75;
  opacity: 0.8;
}
.dash-kpi-card--cyan .dash-kpi-sub {
  color: #155e75;
  opacity: 0.6;
  border-top-color: rgba(21, 94, 117, 0.1);
}

/* Alert */
.dash-alert-amber {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 16px;
  height: 100%;
  max-height: 250px;
  display: flex;
  flex-direction: column;
}
.dash-alert-blue {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 16px;
  height: 100%;
  max-height: 250px;
  display: flex;
  flex-direction: column;
}
#alert-hh-list,
#alert-pt-list {
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
}
#alert-hh-list::-webkit-scrollbar,
#alert-pt-list::-webkit-scrollbar {
  width: 4px;
}
#alert-hh-list::-webkit-scrollbar-thumb,
#alert-pt-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}
.dash-alert-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.dash-alert-amber .dash-alert-title {
  color: #92400e;
}
.dash-alert-blue .dash-alert-title {
  color: #1e40af;
}
.dash-alert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 6px;
  border: 1px solid;
}
.dash-alert-amber .dash-alert-row {
  border-color: #fef3c7;
}
.dash-alert-blue .dash-alert-row {
  border-color: #dbeafe;
}
.dash-alert-code {
  font-size: 12px;
  color: #9ca3af;
  font-family: monospace;
}
.dash-alert-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}
.dash-badge-days {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}
.dash-badge-days--red {
  background: #fee2e2;
  color: #b91c1c;
}
.dash-badge-days--amber {
  background: #fef3c7;
  color: #92400e;
}

/* Charts */
.dash-chart-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.dash-chart-title {
  font-weight: 700;
  color: #1f2937;
  font-family: "Playfair Display", serif;
  margin-bottom: 24px;
  font-size: 20px;
}
.dash-chart-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  margin-bottom: 14px;
}
.dash-chart-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.dash-chart-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Table */
.dash-table {
  width: 100%;
  font-size: 14px;
  border-collapse: collapse;
}
.dash-table thead th {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 20px;
  background: #f9fafb;
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
}
.dash-table tbody td {
  padding: 10px 20px;
  border-bottom: 1px solid #f9fafb;
}
.dash-table tbody tr:hover {
  background: #f9fafb80;
}
.dash-badge-tt {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.dash-badge-tt--paid {
  background: #d1fae5;
  color: #065f46;
}
.dash-badge-tt--partial {
  background: #fef3c7;
  color: #92400e;
}
.dash-badge-tt--unpaid {
  background: #fee2e2;
  color: #991b1b;
}
.dash-badge-stage {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.dash-badge-stage-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dash-badge-stage--green {
  background: #d1fae5;
  color: #065f46;
}
.dash-badge-stage--green .dash-badge-stage-dot {
  background: #10b981;
}
.dash-badge-stage--violet {
  background: #ede9fe;
  color: #5b21b6;
}
.dash-badge-stage--violet .dash-badge-stage-dot {
  background: #7c3aed;
}
.dash-badge-stage--cyan {
  background: #cffafe;
  color: #164e63;
}
.dash-badge-stage--cyan .dash-badge-stage-dot {
  background: #06b6d4;
}
.dash-badge-stage--amber {
  background: #fef3c7;
  color: #92400e;
}
.dash-badge-stage--amber .dash-badge-stage-dot {
  background: #f59e0b;
}
.dash-badge-stage--indigo {
  background: #e0e7ff;
  color: #3730a3;
}
.dash-badge-stage--indigo .dash-badge-stage-dot {
  background: #6366f1;
}

/* Dashboard Utilities */
.dash-bg-primary {
  background: #1c4a35;
}
.dash-bg-secondary {
  background: #b8963c;
}
.dash-bg-purple {
  background: #7c3aed;
}
.dash-bg-cyan {
  background: #0891b2;
}

.dash-alert-title svg {
  width: 16px;
  height: 16px;
}

.dash-chart-container {
  height: 280px;
}
.dash-chart-container--mt {
  height: 280px;
  margin-top: 28px;
}

.dash-card-table {
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.dash-card-table-header {
  padding: 20px;
  border-bottom: 1px solid #f3f4f6;
}
.dash-card-table-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  font-family: "Playfair Display", serif;
}
.dash-table-responsive {
  overflow-x: auto;
}

.dash-loading {
  padding: 20px;
  color: #6b7280;
}
.dash-text-center {
  text-align: center;
}
.dash-text-muted {
  color: #6b7280;
  font-size: 14px;
}

/* === REPORTS PAGE === */
.rpt-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 40px;
}

/* Header */
.rpt-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.rpt-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  font-family: "Playfair Display", serif;
  margin: 0;
  line-height: 1.2;
}
.rpt-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 4px 0 0 0;
}
.rpt-header-right {
  display: flex;
  gap: 12px;
}
.rpt-btn-export {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.rpt-btn-export:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}
.rpt-btn-export svg {
  width: 16px;
  height: 16px;
}
/* Trạng thái active cho nút chọn kỳ (Ngày/Tuần/Tháng/Quý/Năm) */
.rpt-period-buttons button.active {
  color: #fff;
  background: #1c4a35;
  border-color: #1c4a35;
}
.rpt-period-buttons button.active:hover {
  background: #163a2a;
  border-color: #163a2a;
}

/* Tabs Override for Bootstrap */
#reportTabsContent .tab-pane.active {
  display: flex !important;
  flex-direction: column;
  gap: 24px;
}

/* Filters */
.rpt-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  background: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.rpt-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rpt-filter-group label {
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
}
.rpt-filter-group input[type="text"],
.rpt-filter-group input[type="number"],
.rpt-filter-group input[type="date"],
.rpt-filter-group select {
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  outline: none;
  transition: border-color 0.2s;
}
.rpt-filter-group input:focus,
.rpt-filter-group select:focus {
  border-color: var(--cmc-brand, #1c4a35);
}
.rpt-filter-checkbox {
  flex-direction: row;
  align-items: center;
  height: 38px;
}
.rpt-filter-checkbox label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin: 0;
}
.rpt-filter-spacer {
  flex: 1;
}
.rpt-btn-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--cmc-brand, #1c4a35);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  height: 38px;
}
.rpt-btn-filter:hover {
  background: #143525;
}
.rpt-btn-filter svg {
  width: 16px;
  height: 16px;
}

/* KPIs */
.rpt-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.rpt-kpi-card {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.rpt-kpi-card--dual {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.rpt-kpi-divider {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 12px 0;
}
.rpt-kpi-value {
  font-size: 32px;
  font-weight: 700;
  font-family: "Playfair Display", serif;
  line-height: 1.1;
  margin-bottom: 8px;
}
.rpt-kpi-label {
  font-size: 15px;
  color: #6b7280;
  font-weight: 500;
}
.rpt-text-primary {
  color: var(--cmc-brand, #1c4a35);
}
.rpt-text-purple {
  color: #7c3aed;
}
.rpt-text-amber {
  color: #d97706;
}

/* Charts & Tables */
.rpt-chart-card {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.rpt-chart-title {
  font-size: 18px;
  font-weight: 700;
  font-family: "Playfair Display", serif;
  margin: 0 0 20px 0;
  color: #111827;
}
.rpt-chart-container {
  height: 320px;
}
.rpt-table-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* Reports Custom Tabs Overlay */
#reportTabs.nav-tabs {
  display: inline-flex;
  gap: 4px;
  background-color: rgba(243, 244, 246, 0.8);
  padding: 4px;
  border-radius: 12px;
  width: fit-content;
  border-bottom: none;
}
#reportTabs .nav-item {
  margin: 0;
}
#reportTabs .nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  color: #6b7280;
  border: none;
  background: transparent;
  margin: 0;
}
#reportTabs .nav-link:hover:not(.active) {
  color: #374151;
}
#reportTabs .nav-link.active {
  background-color: #fff;
  color: #1f2937;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Quỹ đất Tab Custom UI */
.rpt-qd-wrapper {
  display: flex;
  flex-direction: column;
}
.rpt-qd-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.rpt-qd-kpi-card {
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  border: 1px solid;
}
.rpt-qd-kpi-value {
  font-size: 28px;
  font-weight: 700;
  font-family: "Playfair Display", serif;
  line-height: 1.1;
}
.rpt-qd-kpi-unit {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}
.rpt-qd-kpi-label {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}
.rpt-qd-bars-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.rpt-qd-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  font-size: 12px;
  color: #6b7280;
}
.rpt-qd-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rpt-qd-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}
.rpt-qd-bar-empty {
  color: #9ca3af;
  font-size: 13px;
  text-align: center;
  padding: 16px 0;
}
.rpt-qd-bar-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rpt-qd-bar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}
.rpt-qd-bar-label {
  width: 120px;
  font-weight: 700;
  color: #374151;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rpt-qd-bar-track {
  flex: 1;
  height: 28px;
  border-radius: 12px;
  overflow: hidden;
  background-color: #f3f4f6;
  display: flex;
}
.rpt-qd-bar-segment {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}
.rpt-qd-bar-segment--success {
  background-color: #10b981;
}
.rpt-qd-bar-segment--warning {
  background-color: #f59e0b;
}
.rpt-qd-bar-segment--secondary {
  background-color: #e5e7eb;
  color: #1f2937;
}
.rpt-qd-bar-segment--purple {
  background-color: #7c3aed;
}
.rpt-qd-bar-segment--info {
  background-color: #06b6d4;
}
.rpt-qd-bar-percent {
  font-size: 11px;
  font-family: monospace;
  color: #9ca3af;
  width: 64px;
  text-align: right;
  flex-shrink: 0;
}

/* HĐ Hết Hạn Tab Custom UI */
.rpt-hh-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rpt-hh-group {
  border: 1px solid;
  border-radius: 12px;
  padding: 16px;
}
.rpt-hh-group--red {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.rpt-hh-group--amber {
  background-color: #fffbeb;
  border-color: #fde68a;
  color: #d97706;
}
.rpt-hh-group--yellow {
  background-color: #fefce8;
  border-color: #fef08a;
  color: #a16207;
}
.rpt-hh-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.rpt-hh-header svg {
  width: 14px;
  height: 14px;
}
.rpt-hh-title {
  font-weight: 700;
  font-size: 13px;
}
.rpt-hh-count {
  margin-left: 4px;
  background-color: #fff;
  font-size: 11px;
  font-family: monospace;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid currentColor;
}
.rpt-hh-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rpt-hh-item {
  background-color: #fff;
  border-radius: 8px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.rpt-hh-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  min-width: 0;
}
.rpt-hh-id {
  font-family: monospace;
  font-size: 10px;
  color: #9ca3af;
  flex-shrink: 0;
}
.rpt-hh-name {
  font-weight: 700;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.rpt-hh-dot {
  color: #d1d5db;
  flex-shrink: 0;
}
.rpt-hh-zone {
  font-family: monospace;
  font-size: 10px;
  color: #6b7280;
  flex-shrink: 0;
}
.rpt-hh-item-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.rpt-hh-date {
  font-size: 11px;
  color: #9ca3af;
  font-family: monospace;
}
.rpt-hh-days {
  font-size: 11px;
  font-weight: 700;
  color: #111827;
}
.rpt-hh-btn {
  font-size: 11px;
  color: #1c4a35;
  font-weight: 700;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.rpt-hh-btn:hover {
  text-decoration: underline;
}
.rpt-hh-empty {
  font-size: 13px;
  text-align: center;
  padding: 12px 0;
  opacity: 0.7;
}

/* Công nợ Báo cáo */
.rpt-debt-card {
  background: #ffffff;
  border-radius: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  overflow: hidden;
}
.rpt-debt-card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rpt-debt-card-title {
  font-weight: 700;
  color: #1f2937;
  font-family: "Playfair Display", serif;
  margin: 0;
  font-size: 1.125rem;
}
.rpt-debt-card-total {
  font-weight: 700;
  color: #dc2626;
  font-size: 13px;
}
.rpt-debt-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}
.rpt-debt-table th {
  text-align: left;
  padding: 0.75rem 1.25rem;
  font-size: 10px;
  color: #9ca3af;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  border-bottom: 1px solid #f3f4f6;
  background-color: rgba(249, 250, 251, 0.6);
}
.rpt-debt-table td {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #f9fafb;
  vertical-align: middle;
}
.rpt-debt-table tbody tr:hover {
  background-color: rgba(249, 250, 251, 0.5);
}
.rpt-debt-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.rpt-debt-progress-bg {
  width: 4rem;
  background-color: #f3f4f6;
  border-radius: 9999px;
  height: 0.375rem;
  overflow: hidden;
}
.rpt-debt-progress-fill {
  height: 100%;
  border-radius: 9999px;
  background-color: #1c4a35;
}
.rpt-debt-progress-text {
  font-size: 11px;
  font-family: monospace;
  color: #6b7280;
}
.rpt-debt-status {
  display: inline-flex;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 11px;
  font-weight: 600;
}
.rpt-debt-status--done {
  background-color: #d1fae5;
  color: #047857;
}
.rpt-debt-status--partial {
  background-color: #fef3c7;
  color: #b45309;
}
.rpt-debt-status--none {
  background-color: #fee2e2;
  color: #b91c1c;
}
.rpt-font-mono {
  font-family: monospace;
}
.rpt-text-emerald {
  color: #047857;
  font-weight: 700;
}
.rpt-text-red {
  color: #dc2626;
  font-weight: 700;
}
.rpt-text-gray {
  color: #4b5563;
}
.rpt-text-gray-light {
  color: #9ca3af;
}
.rpt-text-dark {
  color: #1f2937;
  font-weight: 700;
}
.rpt-text-center {
  text-align: center;
}

/* Kế thừa Playfair Display cho tiêu đề lớn Payments */
.pm-page-title {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  line-height: 1.25;
  font-family: "Playfair Display", serif;
}
.pm-page-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

/* KPI Grid */
.pm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
@media (min-width: 992px) {
  .pm-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.pm-kpi-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
  transition: box-shadow 0.2s;
}
.pm-kpi-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.pm-kpi-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.pm-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pm-kpi-val {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  font-family: "Playfair Display", serif;
}
.pm-kpi-lbl {
  font-size: 13px;
  color: #6b7280;
  margin-top: 2px;
}
.pm-kpi-sub {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
}

/* Toolbar */
.pm-toolbar-wrapper {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.pm-search-input {
  padding-left: 36px;
  padding-right: 12px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 13px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  width: 256px;
  outline: none;
}
.pm-search-input:focus {
  border-color: rgba(28,74,53,0.3);
  box-shadow: 0 0 0 2px rgba(28,74,53,0.2);
}
.pm-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}
.pm-filter-group {
  display: flex;
  gap: 4px;
  background: rgba(243,244,246,0.8);
  padding: 4px;
  border-radius: 12px;
}
.pm-filter-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}
.pm-filter-btn:hover {
  color: #374151;
}
.pm-filter-btn.active {
  background: #fff;
  color: #1f2937;
  box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
}

