/* App shell - sidebar 1 cột (sửa menu tại js/app-menu-config.js) v1.0.104 */
:root {
  /* Brand - xanh cây chủ đạo, vàng điểm nhấn */
  --shell-blue: #15733c;
  --shell-blue-dark: #0f5a2e;
  --shell-blue-soft: #2a8f52;
  --shell-blue-text: #15733c;
  --shell-blue-hover: #e8f5ec;
  --shell-accent: #f9d448;
  --shell-accent-dark: #e5bc2a;
  --shell-accent-soft: #fef9e7;
  --shell-bg: #f4f6fb;
  --shell-surface: #ffffff;
  --shell-border: #e4e8f0;
  --shell-text: #1e293b;
  --shell-muted: #64748b;
  --bm-table-th-bg: var(--shell-blue);
  --bm-table-th-color: #fff;
  --shell-icon-w: 58px;
  --shell-menu-w: 252px;
  --shell-header-h: 56px;
  --shell-font: "Montserrat", "Segoe UI", Tahoma, Arial, sans-serif;
  /* Sidebar */
  --shell-sidebar-bg: #ffffff;
  --shell-sidebar-bg-dark: #0f5a2e;
  --shell-sidebar-bg-parent: #15733c;
  --shell-sidebar-bg-child-active: #15733c;
  --shell-sidebar-border: #e4e8f0;
  --shell-sidebar-divider: #e8ecf0;
  --shell-sidebar-text: #15733c;
  --shell-sidebar-text-muted: #2a8f52;
  --shell-sidebar-hover: #e8f5ec;
  --shell-sidebar-active: #15733c;
  --shell-sidebar-on-green-text: #ffffff;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--shell-font);
  color: var(--shell-text);
  background: var(--shell-bg);
}

/*
 * Skeleton ngay khi HTML parse — trước khi app-shell.js chạy.
 * Tránh khoảng xám trống mỗi lần đổi trang (chờ tải JS).
 */
#app-shell:empty {
  display: block;
  min-height: 100vh;
  background: var(--shell-bg);
  position: relative;
}
#app-shell:empty::before {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: var(--shell-header-h);
  background: var(--shell-surface);
  border-bottom: 1px solid var(--shell-border);
  z-index: 2;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}
#app-shell:empty::after {
  content: "";
  position: fixed;
  left: 50%;
  top: 42%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 3px solid #d1e7da;
  border-top-color: var(--shell-blue);
  border-radius: 50%;
  animation: bm-shell-boot-spin 0.65s linear infinite;
  z-index: 3;
}
@keyframes bm-shell-boot-spin {
  to { transform: rotate(360deg); }
}
@media (min-width: 981px) {
  #app-shell:empty::before {
    left: var(--shell-menu-w);
  }
  #app-shell:empty {
    background:
      linear-gradient(var(--shell-surface), var(--shell-surface)) 0 0 / var(--shell-menu-w) 100% no-repeat,
      var(--shell-bg);
    box-shadow: inset var(--shell-menu-w) 0 0 0 var(--shell-surface);
    border-left: 0;
  }
}

.shell-app {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar: danh sách phẳng icon + chữ ── */
.shell-sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  width: var(--shell-icon-w);
  height: auto;
  min-height: 100vh;
  max-height: none;
  background: var(--shell-sidebar-bg);
  border-right: 1px solid var(--shell-sidebar-border);
  color: var(--shell-sidebar-text);
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 30;
  overflow: visible;
}

.shell-app:not(.is-sidebar-collapsed) .shell-sidebar {
  width: var(--shell-menu-w);
}
.shell-app.is-sidebar-collapsed .shell-sidebar {
  width: var(--shell-icon-w);
}
.shell-app.is-sidebar-collapsed .shell-sidebar-icons {
  display: flex;
  flex: 1 1 auto;
  min-height: 240px;
}

.shell-sidebar-icons {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-height: 0;
  padding: 12px 0;
  gap: 2px;
  overflow-x: hidden;
  overflow-y: auto;
}
.shell-app:not(.is-sidebar-collapsed) .shell-sidebar-icons {
  display: none;
}

.shell-sidebar-menu {
  display: none;
  flex: 0 0 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: visible;
  padding: 2px 0 10px;
}
.shell-app:not(.is-sidebar-collapsed) .shell-sidebar-menu {
  display: block;
}

.shell-module-block {
  border-bottom: 1px solid var(--shell-sidebar-divider);
}
.shell-module-block:last-child {
  border-bottom: none;
}

a.shell-module-row,
a.shell-icon-btn {
  text-decoration: none;
}

.shell-module-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: #fff;
  padding: 9px 14px;
  cursor: pointer;
  color: var(--shell-sidebar-text);
  font-family: var(--shell-font);
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
  line-height: 1.2;
  transition: background 0.15s ease;
}
.shell-module-row:hover {
  background: var(--shell-sidebar-hover);
}
.shell-module-row--link:hover {
  background: var(--shell-sidebar-hover);
}
.shell-module-row svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
  opacity: 0.95;
}
.shell-module-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shell-module-row__label {
  display: block;
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shell-module-row .shell-chat-unread {
  overflow: visible;
  text-overflow: unset;
  white-space: nowrap;
}

/* Module đang mở - hàng cha (ấn để ẩn/hiện menu con) */
.shell-module-row--parent {
  margin: 0;
  padding: 9px 14px;
  width: 100%;
  border-radius: 0;
  background: var(--shell-sidebar-bg-parent);
  color: var(--shell-sidebar-on-green-text);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.shell-module-row--parent:hover {
  background: #126832;
  color: var(--shell-sidebar-on-green-text);
}
.shell-module-row--parent svg:not(.shell-module-row__chev) {
  fill: currentColor;
  opacity: 1;
}
.shell-module-row--parent .shell-module-row__chev {
  margin-left: auto;
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
  opacity: 0.92;
  transition: transform 0.2s ease;
}
.shell-module-block.is-nav-collapsed .shell-module-row--parent .shell-module-row__chev {
  transform: rotate(-90deg);
}
.shell-module-block.is-active.is-nav-collapsed .shell-module-nav {
  display: none;
}

/* Mục con khi mở module - xuất hiện lần lượt */
.shell-module-block.is-active .shell-module-row--parent {
  animation: shell-module-in 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.shell-module-block.is-active.is-nav-open .shell-module-nav > .shell-nav-link,
.shell-module-block.is-active.is-nav-open .shell-module-nav > .shell-nav-group {
  animation: shell-sub-item-in 0.3s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}
.shell-module-block.is-active .shell-module-nav > *:nth-child(1) { animation-delay: 0.05s; }
.shell-module-block.is-active .shell-module-nav > *:nth-child(2) { animation-delay: 0.09s; }
.shell-module-block.is-active .shell-module-nav > *:nth-child(3) { animation-delay: 0.13s; }
.shell-module-block.is-active .shell-module-nav > *:nth-child(4) { animation-delay: 0.17s; }
.shell-module-block.is-active .shell-module-nav > *:nth-child(5) { animation-delay: 0.21s; }
.shell-module-block.is-active .shell-module-nav > *:nth-child(6) { animation-delay: 0.25s; }
.shell-module-block.is-active .shell-module-nav > *:nth-child(7) { animation-delay: 0.29s; }
.shell-module-block.is-active .shell-module-nav > *:nth-child(8) { animation-delay: 0.33s; }
.shell-module-block.is-active .shell-module-nav > *:nth-child(9) { animation-delay: 0.37s; }
.shell-module-block.is-active .shell-module-nav > *:nth-child(10) { animation-delay: 0.41s; }

/* Module đang mở - hiển thị hết mục con, không cuộn trong khối */
.shell-module-block.is-active .shell-module-nav {
  background: #fff;
  max-height: none;
  overflow-x: hidden;
  overflow-y: visible;
}

.shell-icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--shell-sidebar-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.shell-icon-btn:hover {
  background: var(--shell-sidebar-hover);
  color: var(--shell-sidebar-bg-parent);
}
.shell-icon-btn.is-active {
  background: var(--shell-sidebar-bg-parent);
  color: var(--shell-sidebar-on-green-text);
}
.shell-icon-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.shell-icon-btn.is-flyout-open {
  background: var(--shell-sidebar-hover);
  color: var(--shell-sidebar-bg-parent);
}

.shell-icon-flyout {
  position: fixed;
  z-index: 200;
  min-width: 200px;
  max-width: 260px;
  max-height: min(70vh, 480px);
  overflow: auto;
  padding: 8px 0 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.16);
  color: #0f172a;
}
.shell-icon-flyout::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -14px;
  width: 14px;
}
.shell-icon-flyout[hidden] {
  display: none !important;
}
.shell-icon-flyout__title {
  margin: 0 10px 6px;
  padding: 2px 4px 8px;
  border-bottom: 1px solid #eef2f6;
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f5a2e;
  line-height: 1.3;
}
.shell-icon-flyout__list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 6px;
}
.shell-icon-flyout__group {
  margin: 8px 8px 2px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.shell-icon-flyout__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 7px;
  color: #334155;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
}
.shell-icon-flyout__link.is-child {
  padding-left: 16px;
  font-weight: 500;
  color: #475569;
}
.shell-icon-flyout__link:hover {
  background: #e8f5ec;
  color: #0f5a2e;
}
.shell-icon-flyout__empty {
  margin: 0;
  padding: 8px 16px;
  font-size: 0.78rem;
  color: #94a3b8;
}

.shell-module-nav {
  padding: 4px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shell-menu-empty {
  padding: 20px 16px;
  font-size: 0.86rem;
  color: var(--shell-sidebar-text-muted);
  text-align: center;
}

/* ── Mục con (link đơn) ── */
.shell-nav-link {
  display: flex;
  align-items: center;
  min-height: 34px;
  box-sizing: border-box;
  padding: 0 12px 0 40px;
  margin: 0;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--shell-sidebar-text);
  background: #fff;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.shell-nav-link:hover {
  background: var(--shell-sidebar-hover);
  color: var(--shell-sidebar-bg-dark);
}
.shell-nav-link.is-active {
  color: var(--shell-sidebar-on-green-text);
  background: var(--shell-sidebar-bg-child-active);
  font-weight: 600;
}

.shell-nav-link__label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.shell-nav-link__inner .shell-nav-link__label {
  flex: 1;
}
.shell-nav-badge {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 55%, #dc2626 100%);
  background-size: 200% 200%;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.28);
  animation:
    shell-nav-badge-glow 2.6s ease-in-out infinite,
    shell-nav-badge-gradient 4s ease-in-out infinite;
}
.shell-nav-badge::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 42%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 35%,
    rgba(255, 255, 255, 0.72) 50%,
    rgba(255, 255, 255, 0.08) 65%,
    transparent 100%
  );
  transform: translateX(-160%) skewX(-18deg);
  animation: shell-nav-badge-shine 3.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shell-nav-badge-glow {
  0%, 100% {
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.25), 0 0 0 0 rgba(245, 158, 11, 0);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.42), 0 0 10px 1px rgba(245, 158, 11, 0.38);
    transform: scale(1.05);
  }
}
@keyframes shell-nav-badge-gradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes shell-nav-badge-shine {
  0%, 18% { transform: translateX(-160%) skewX(-18deg); opacity: 0; }
  28% { opacity: 1; }
  62% { transform: translateX(320%) skewX(-18deg); opacity: 0; }
  100% { transform: translateX(320%) skewX(-18deg); opacity: 0; }
}
.shell-nav-link:hover .shell-nav-badge {
  animation-duration: 1.8s, 3s;
}
@media (prefers-reduced-motion: reduce) {
  .shell-nav-badge,
  .shell-nav-badge::after {
    animation: none !important;
  }
}

/* ── Nhóm accordion (module có nhiều cấp) ── */
.shell-nav-group {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.shell-nav-group-btn {
  width: 100%;
  border: none;
  background: #fff;
  min-height: 34px;
  box-sizing: border-box;
  padding: 0 12px 0 40px;
  border-radius: 6px;
  font-family: var(--shell-font);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--shell-sidebar-text);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.shell-nav-group-btn:hover {
  background: var(--shell-sidebar-hover);
  color: var(--shell-sidebar-bg-dark);
}
.shell-nav-group.is-open .shell-nav-group-btn {
  color: var(--shell-sidebar-text);
  background: #fff;
}
.shell-nav-group-btn .chev {
  width: 14px;
  height: 14px;
  fill: var(--shell-sidebar-text-muted);
  transition: transform 0.2s ease, fill 0.15s ease;
  flex-shrink: 0;
  opacity: 0.9;
}
.shell-nav-group.is-open .shell-nav-group-btn .chev {
  transform: rotate(180deg);
  fill: var(--shell-sidebar-text);
}

.shell-nav-sub {
  display: none;
  overflow: hidden;
  margin: 0;
  padding: 0;
  background: transparent;
}
.shell-nav-group.is-open .shell-nav-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: none;
  opacity: 1;
  padding: 0;
  transform: none;
}

.shell-nav-group.is-open .shell-nav-sub a {
  animation: shell-sub-item-in 0.28s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}
.shell-nav-group.is-open .shell-nav-sub a:nth-child(1) { animation-delay: 0.04s; }
.shell-nav-group.is-open .shell-nav-sub a:nth-child(2) { animation-delay: 0.08s; }
.shell-nav-group.is-open .shell-nav-sub a:nth-child(3) { animation-delay: 0.12s; }
.shell-nav-group.is-open .shell-nav-sub a:nth-child(4) { animation-delay: 0.16s; }
.shell-nav-group.is-open .shell-nav-sub a:nth-child(5) { animation-delay: 0.2s; }
.shell-nav-group.is-open .shell-nav-sub a:nth-child(6) { animation-delay: 0.24s; }
.shell-nav-group.is-open .shell-nav-sub a:nth-child(7) { animation-delay: 0.28s; }
.shell-nav-group.is-open .shell-nav-sub a:nth-child(8) { animation-delay: 0.32s; }

.shell-nav-sub a {
  display: flex;
  align-items: center;
  min-height: 32px;
  box-sizing: border-box;
  padding: 0 12px 0 48px;
  margin: 0;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--shell-sidebar-text);
  background: #fff;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.shell-nav-sub a:hover {
  background: var(--shell-sidebar-hover);
  color: var(--shell-sidebar-bg-dark);
}
.shell-nav-sub a.is-active {
  background: var(--shell-sidebar-bg-child-active);
  color: var(--shell-sidebar-on-green-text);
  font-weight: 600;
}

.shell-nav-link__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.shell-nav-link__ico-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  border-radius: 5px;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  flex-shrink: 0;
  padding: 1px 3px;
  line-height: 0;
}

.shell-nav-link__ico {
  height: 28px;
  width: auto;
  max-width: 42px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.shell-nav-link__text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.shell-nav-sub a.shell-nav-link--iconed {
  display: flex;
  align-items: center;
  padding: 8px 10px 8px 38px;
}

/* Check-in Online - danh sách hãng (logo khung trắng + tên bên phải) */
.shell-nav-sub a.shell-nav-link--checkin-airline {
  padding: 5px 10px 5px 36px;
  margin: 3px 0;
  border-radius: 8px;
  background: #fff;
}

.shell-nav-link--checkin-airline .shell-nav-link__inner {
  gap: 10px;
}

.shell-nav-link--checkin-airline .shell-nav-link__ico-wrap {
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e6ebf0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  padding: 2px 4px;
}

.shell-nav-link--checkin-airline .shell-nav-link__ico {
  height: 26px;
  max-width: 46px;
}

.shell-nav-link--checkin-airline .shell-nav-link__text {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.shell-nav-sub a.shell-nav-link--checkin-airline:hover {
  background: var(--shell-sidebar-hover);
  color: var(--shell-sidebar-text);
}

.shell-nav-sub a.shell-nav-link--checkin-airline.is-active {
  background: var(--shell-sidebar-hover);
  color: var(--shell-sidebar-text);
  font-weight: 600;
}

.shell-nav-sub a.shell-nav-link--checkin-airline.is-active .shell-nav-link__text {
  color: var(--shell-sidebar-text);
  font-weight: 600;
}

.shell-nav-sub a.shell-nav-link--checkin-airline.is-active .shell-nav-link__ico-wrap {
  background: #fff;
  border-color: #dce5ec;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.shell-nav-sub a.is-active:not(.shell-nav-link--checkin-airline):not(.shell-nav-link--arrival-flag) .shell-nav-link__ico-wrap {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
}

/* Khai báo nhập cảnh - cờ cùng kích thước, không padding */
.shell-nav-sub a.shell-nav-link--arrival-flag {
  padding: 5px 10px 5px 36px;
  margin: 3px 0;
  border-radius: 8px;
  background: #fff;
}

.shell-nav-link--arrival-flag .shell-nav-link__inner {
  gap: 10px;
}

.shell-nav-link--arrival-flag .shell-nav-link__ico-wrap {
  width: 40px;
  height: 26px;
  padding: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d8e0e8;
  box-shadow: none;
  line-height: 0;
}

.shell-nav-link--arrival-flag .shell-nav-link__ico {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  display: block;
}

.shell-nav-link--arrival-flag .shell-nav-link__text {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.shell-nav-sub a.shell-nav-link--arrival-flag:hover {
  background: var(--shell-sidebar-hover);
  color: var(--shell-sidebar-text);
}

.shell-nav-sub a.shell-nav-link--arrival-flag.is-active {
  background: var(--shell-sidebar-hover);
  color: var(--shell-sidebar-text);
  font-weight: 600;
}

.shell-nav-sub a.shell-nav-link--arrival-flag.is-active .shell-nav-link__text {
  color: var(--shell-sidebar-text);
  font-weight: 600;
}

.shell-nav-sub a.shell-nav-link--arrival-flag.is-active .shell-nav-link__ico-wrap {
  background: #fff;
  border-color: #c5d0db;
}

.shell-sidebar-toggle {
  position: fixed;
  top: 38vh;
  left: var(--shell-menu-w);
  z-index: 50;
  width: 16px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 0 4px 4px 0;
  background: var(--shell-sidebar-bg-dark);
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--shell-font);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: -2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.18);
  transition: background 0.15s, left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  opacity: 0.92;
}
.shell-app.is-sidebar-collapsed .shell-sidebar-toggle {
  left: var(--shell-icon-w);
}
.shell-sidebar-toggle:hover {
  background: #024a25;
  opacity: 1;
}
.shell-sidebar-toggle .icon-expand { display: none; }
.shell-app.is-sidebar-collapsed .shell-sidebar-toggle .icon-collapse { display: none; }
.shell-app.is-sidebar-collapsed .shell-sidebar-toggle .icon-expand { display: block; }

/* ── Main area ── */
.shell-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.shell-topbar {
  position: sticky;
  top: 0;
  z-index: 110;
  height: var(--shell-header-h);
  flex-shrink: 0;
  background: var(--shell-surface);
  border-bottom: 1px solid var(--shell-border);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
}
.shell-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  min-width: max-content;
}
.shell-topbar-menu-btn {
  display: none;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--shell-text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.shell-topbar-menu-btn:hover {
  background: transparent;
  opacity: 0.7;
}

/* Logo + tên công ty */
.shell-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  border-radius: 0;
  padding: 0;
  margin: 0;
  transition: opacity 0.15s ease;
}
.shell-brand:hover {
  background: transparent;
  opacity: 0.82;
}
.shell-brand__logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  padding: 0;
}
.shell-brand__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--shell-blue);
  letter-spacing: 0;
  white-space: nowrap;
  line-height: 1.2;
}
.shell-topbar-divider {
  width: 1px;
  height: 22px;
  background: #e2e8f0;
  flex-shrink: 0;
}
.shell-topbar-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: visible;
  flex-shrink: 0;
}

.shell-announce {
  display: none;
  flex: 1 1 auto;
  align-self: center;
  min-width: 80px;
  max-width: 100%;
  height: 26px;
  margin: 0 4px;
  overflow: hidden;
}
.shell-announce.is-on {
  display: block;
  background: #15733c;
  color: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(21, 115, 60, 0.22);
}
.shell-announce[hidden] {
  display: none !important;
}
.shell-announce__inner {
  overflow: hidden;
  width: 100%;
  height: 100%;
  mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent);
}
.shell-announce__track {
  display: inline-block;
  margin: 0;
  padding: 0 0 0 100%;
  white-space: nowrap;
  line-height: 26px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  --shell-announce-dur: 32s;
}
@media (prefers-reduced-motion: no-preference) {
  .shell-announce.is-on .shell-announce__track {
    animation: shell-announce-marquee var(--shell-announce-dur, 32s) linear infinite;
  }
  .shell-announce.is-on:hover .shell-announce__track {
    animation-play-state: paused;
  }
}
.shell-announce__link {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.shell-announce__link:hover {
  color: #e8fff0;
}
@keyframes shell-announce-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
.shell-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.shell-topbar-icon {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--shell-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.shell-topbar-icon:hover {
  background: var(--shell-blue-hover);
  color: var(--shell-blue);
}
.shell-topbar-icon svg { width: 20px; height: 20px; fill: currentColor; }

.shell-notify-wrap {
  position: relative;
  flex-shrink: 0;
}
.shell-notify-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 10px;
}
.shell-notify-btn svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}
.shell-notify-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
}
.shell-notify-badge.hidden {
  display: none;
}

/* Badge số chat Zalo chưa đọc: Booker + Chat Zalo (nền đỏ, chữ trắng) */
.shell-chat-unread {
  position: absolute;
  top: -6px;
  right: -10px;
  z-index: 2;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  border: 0;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 0 0 1.5px #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.shell-chat-unread.hidden,
.shell-chat-unread[hidden] {
  display: none !important;
}
.shell-nav-link .shell-chat-unread {
  position: static;
  top: auto;
  right: auto;
  flex-shrink: 0;
  margin-left: 6px;
}
.shell-module-row__ico-slot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.shell-chat-unread--mod {
  position: static !important;
  top: auto;
  right: auto;
  flex-shrink: 0;
  margin-left: 8px;
  margin-right: 4px;
}
.shell-chat-unread--rail {
  top: 2px;
  right: 2px;
  min-width: 15px;
  height: 15px;
  line-height: 13px;
  font-size: 0.58rem;
}

.shell-notify-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 24px));
  max-height: min(420px, 70vh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--shell-border, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  z-index: 30;
}
.shell-notify-dropdown.hidden {
  display: none;
}
.shell-notify-dropdown__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--shell-border, #e2e8f0);
}
.shell-notify-dropdown__title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
}
.shell-notify-dropdown__read-all {
  border: none;
  background: transparent;
  color: var(--shell-blue, #15733c);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}
.shell-notify-dropdown__read-all:hover {
  text-decoration: underline;
}
.shell-notify-dropdown__list {
  overflow: auto;
  padding: 6px 0;
  flex: 1 1 auto;
  min-height: 0;
}
.shell-notify-empty {
  padding: 20px 16px;
  text-align: center;
  color: var(--shell-muted, #64748b);
  font-size: 0.82rem;
}
.shell-notify-item {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f1f5f9;
}
.shell-notify-item:last-child {
  border-bottom: none;
}
.shell-notify-item:hover {
  background: #f8fafc;
}
.shell-notify-item.is-unread {
  background: #f0fdf4;
}
.shell-notify-item__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}
.shell-notify-item__title {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shell-notify-item__msg {
  display: block;
  font-size: 0.76rem;
  color: #475467;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.shell-notify-item__time {
  flex: 0 0 auto;
  margin-top: 0;
  font-size: 0.68rem;
  font-weight: 500;
  color: #94a3b8;
  white-space: nowrap;
}
.shell-notify-dropdown__settings {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  border: none;
  border-top: 1px solid var(--shell-border, #e2e8f0);
  background: #fff;
  color: #334155;
  padding: 10px 14px;
  font-family: var(--shell-font);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  flex-shrink: 0;
}
.shell-notify-dropdown__settings svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
  opacity: 0.72;
}
.shell-notify-dropdown__settings:hover {
  background: #f8fafc;
  color: #15733c;
}

.shell-usd {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--shell-blue, #15733c);
  border: none;
  outline: none;
  box-shadow: none;
  color: #fff;
  white-space: nowrap;
}
.shell-usd[hidden],
.shell-usd.is-loading {
  display: none !important;
}
.shell-usd__label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.92;
}
.shell-usd__value {
  font-variant-numeric: tabular-nums;
  color: #fff;
  font-weight: 800;
}
.shell-flag {
  width: 26px;
  height: 18px;
  border-radius: 3px;
  object-fit: cover;
  border: 1px solid var(--shell-border);
  flex-shrink: 0;
}

/* Thẻ agent / user */
.shell-user-wrap {
  position: relative;
  flex-shrink: 0;
  z-index: 2;
}
.shell-user-card {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-height: 0;
  max-width: none;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--shell-text);
  cursor: pointer;
  font-family: var(--shell-font);
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  transition: opacity 0.15s ease;
}
.shell-user-card:hover {
  background: transparent;
  opacity: 0.82;
}
.shell-user-card[aria-expanded="true"] {
  background: transparent;
  opacity: 1;
}
.shell-user-avatar,
.shell-user-dropdown-avatar {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
  color: #64748b;
  background: transparent;
  border: none;
}
.shell-user-avatar.is-admin,
.shell-user-dropdown-avatar.is-admin,
.shell-user-avatar.is-staff,
.shell-user-dropdown-avatar.is-staff,
.shell-user-avatar.is-agency,
.shell-user-dropdown-avatar.is-agency {
  color: #64748b;
  background: transparent;
}
.shell-user-avatar.has-image,
.shell-user-dropdown-avatar.has-image {
  padding: 0;
  overflow: hidden;
  background: transparent;
}
.shell-user-avatar.has-image img,
.shell-user-dropdown-avatar.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shell-user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  max-width: none;
  width: max-content;
  padding: 0 6px;
  text-align: left;
}
.shell-user-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--shell-text);
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  line-height: 1.25;
}
.shell-user-subline {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--shell-muted);
  max-width: none;
  width: max-content;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  line-height: 1.2;
}
.shell-user-subline.is-admin,
.shell-user-subline.is-staff {
  color: #b91c1c;
  font-weight: 600;
}
.shell-user-subline.is-agency {
  color: #64748b;
  font-weight: 500;
}
.shell-user-subline.is-debt-negative { color: #b91c1c; font-weight: 600; }
.shell-user-subline.is-debt-positive { color: #15803d; font-weight: 600; }
.shell-user-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: #94a3b8;
  transition: transform 0.2s ease;
}
.shell-user-card:hover .shell-user-chevron { fill: #64748b; }
.shell-user-card[aria-expanded="true"] .shell-user-chevron {
  transform: rotate(180deg);
  fill: #64748b;
}

.shell-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  width: 240px;
  min-width: 240px;
  background: #fff;
  border: 1px solid #d8dde6;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  padding: 6px;
  z-index: 120;
  box-sizing: border-box;
}
.shell-user-dropdown.hidden { display: none; }
.shell-user-dropdown-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 10px;
}
.shell-user-dropdown-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.shell-user-dropdown-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--shell-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shell-user-dropdown-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--shell-muted);
}
.shell-user-dropdown-sub.is-admin,
.shell-user-dropdown-sub.is-staff {
  color: #b91c1c;
  font-weight: 600;
}
.shell-user-dropdown-sub.is-agency {
  color: #64748b;
  font-weight: 500;
}
.shell-user-dropdown-sub.is-debt-negative { color: #b91c1c; font-weight: 600; }
.shell-user-dropdown-sub.is-debt-positive { color: #15803d; font-weight: 600; }
.shell-user-dropdown-sep {
  height: 1px;
  margin: 2px 6px 6px;
  background: var(--shell-border);
}
.shell-user-menu-item[hidden] {
  display: none !important;
}
.shell-user-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-family: var(--shell-font);
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.shell-user-menu-item svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
  opacity: 0.75;
}
.shell-user-menu-item:hover {
  background: #f1f5f9;
  color: #334155;
}
.shell-user-menu-item--danger { color: #b91c1c; }
.shell-user-menu-item--danger:hover {
  background: #fef2f2;
  color: #991b1b;
}
.shell-user-menu-item.is-loading {
  opacity: 0.55;
  pointer-events: none;
}
.shell-menu-icon {
  width: 18px;
  height: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.shell-menu-icon__bar {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  transform-origin: center;
}
.shell-app.is-mobile-nav-open .shell-menu-icon__bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.shell-app.is-mobile-nav-open .shell-menu-icon__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.shell-app.is-mobile-nav-open .shell-menu-icon__bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
.shell-nav-backdrop { display: none; }

.shell-mobile-drawer-head {
  display: none;
}

.shell-mobile-drawer-search {
  display: none;
}

@keyframes shell-sub-item-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes shell-module-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.shell-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 12px;
  border-left: 1px solid var(--shell-border);
}
.shell-user img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--shell-border);
}
.shell-user-info { line-height: 1.25; }
.shell-user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: 0.01em;
  line-height: 1.2;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}
.shell-user-name.is-staff { font-weight: 600; }
.shell-user-name.is-admin { font-weight: 600; }
.shell-user-balance,
.shell-user-subline {
  font-size: 0.67rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.3;
  max-width: none;
  width: max-content;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.shell-user-subline.is-admin,
.shell-user-subline.is-staff {
  display: block;
  width: auto;
  max-width: 100%;
  padding: 0;
  border-radius: 0;
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
  color: #b91c1c;
  background: transparent;
}
.shell-user-subline.is-agency {
  color: #64748b;
  font-weight: 500;
}
.shell-user-subline.is-debt-negative { color: #b91c1c; background: transparent; padding: 0; border-radius: 0; font-weight: 600; }
.shell-user-subline.is-debt-positive { color: #15803d; background: transparent; padding: 0; border-radius: 0; font-weight: 600; }

.shell-content:has(.fb-page),
.shell-content:has(.shell-page) {
  padding: 16px 18px 24px;
}
.shell-content {
  flex: 1;
  padding: 20px 22px 32px;
  overflow-y: auto;
  min-height: 0;
}
.shell-app.is-sidebar-collapsed .shell-content:has(.fb-page),
.shell-app.is-sidebar-collapsed .shell-content:has(.shell-page) {
  padding: 16px 18px 24px;
}
.shell-app.is-sidebar-collapsed .shell-content {
  padding: 16px 20px 24px;
}

/* ── Layout chuẩn nội dung trang (đồng bộ flight-booking .fb-page / .fb-box) ──
 * Quy ước chiều rộng:
 *   - .shell-page: full width vùng .shell-content (không max-width mặc định)
 *   - .shell-panel / .fb-box: khối nội dung, width 100%
 *   - Chỉ thêm max-width riêng khi trang cần giới hạn đọc (vd. board-main)
 * HTML mẫu:
 *   <div class="shell-page my-page">
 *     <section class="shell-panel">...</section>
 *   </div>
 */
.shell-page {
  width: 100%;
  max-width: none;
  margin: 0;
  color: var(--shell-text);
  line-height: 1.45;
  box-sizing: border-box;
}

.shell-page-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: none;
}
.shell-page-stack > .shell-panel {
  margin-bottom: 0;
}

.shell-panel {
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: 4px;
  padding: 16px 18px 18px;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.shell-panel:last-child {
  margin-bottom: 0;
}

.shell-panel__title {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--shell-text);
}

/* Thanh accent xanh - tiêu đề section (đồng bộ toàn site) */
.shell-panel__title,
.agency-users-title,
.agency-users-head h2,
.shell-panel .panel-title-row > h2,
.shell-panel .panel-title,
.shell-panel .shell-panel__title,
.fb-box__title,
.fb-recent__title,
.fb-notices__title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shell-panel__title::before,
.agency-users-title::before,
.agency-users-head h2::before,
.shell-panel .panel-title-row > h2::before,
.shell-panel .panel-title::before,
.shell-panel .shell-panel__title::before,
.fb-box__title::before,
.fb-recent__title::before,
.fb-notices__title::before {
  content: "";
  flex-shrink: 0;
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: var(--shell-blue, #15733c);
}

@media (max-width: 900px) {
  .shell-page {
    max-width: 100%;
    overflow-x: hidden;
  }
  .shell-panel {
    padding: 12px 10px 14px;
    margin-bottom: 12px;
  }
}

/* ── Coming soon ── */
.shell-content :focus-visible {
  outline: 2px solid var(--shell-accent);
  outline-offset: 2px;
}

.coming-soon {
  max-width: 520px;
  margin: 48px auto;
  padding: 40px 32px;
  text-align: center;
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
}
.coming-soon-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--shell-blue-hover);
  display: flex;
  align-items: center;
  justify-content: center;
}
.coming-soon-icon svg {
  width: 32px;
  height: 32px;
  fill: var(--shell-blue);
}
.coming-soon h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--shell-text);
}
.coming-soon p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--shell-muted);
  font-weight: 500;
}
.coming-soon-sub {
  margin-top: 8px !important;
  font-size: 0.82rem !important;
}

/* ── Đổi mật khẩu (popup giống Flutter / Tìm chuyến bay) ── */
.shell-chpw-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 6, 23, 0.44);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.shell-chpw-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid #dbe3ec;
  border-radius: 14px;
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}
.shell-chpw-card--profile {
  max-width: 440px;
}
.shell-chpw-card--profile .shell-chpw-head {
  padding: 10px 14px;
}
.shell-chpw-card--profile .shell-chpw-form {
  padding: 12px 14px 14px;
  gap: 8px;
}
.shell-chpw-card--profile .shell-chpw-field {
  gap: 3px;
}
.shell-chpw-card--profile .shell-chpw-field label {
  font-size: 11px;
}
.shell-chpw-card--profile .shell-chpw-field input,
.shell-chpw-card--profile .shell-chpw-input-wrap input {
  height: 32px;
  font-size: 13px;
  border-radius: 7px;
}
.shell-chpw-card--profile .shell-chpw-eye {
  width: 28px;
  height: 28px;
}
.shell-chpw-card--profile .shell-chpw-eye svg {
  width: 15px;
  height: 15px;
}
.shell-chpw-card--profile .shell-chpw-actions {
  gap: 8px;
  margin-top: 4px;
}
.shell-chpw-card--profile .shell-chpw-btn {
  min-height: 34px;
  font-size: 12px;
  border-radius: 7px;
}
.shell-chpw-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid #e6edf5;
  background: #fff;
}
.shell-chpw-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.shell-chpw-close {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.shell-chpw-close:hover {
  background: #fff;
}
.shell-chpw-form {
  padding: 16px 18px 18px;
  display: grid;
  gap: 14px;
}
.shell-chpw-note {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}
.shell-chpw-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.shell-chpw-field[hidden] {
  display: none !important;
}
.shell-chpw-field label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}
.shell-chpw-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.shell-chpw-field input,
.shell-chpw-input-wrap input {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  height: 42px;
  padding: 0 42px 0 12px;
  font-size: 13px;
  font-weight: 400;
  color: #0f172a;
  background: #fff;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}
.shell-chpw-field input:focus,
.shell-chpw-input-wrap input:focus {
  outline: none;
  border-color: #15733c;
  box-shadow: 0 0 0 1px rgba(21, 115, 60, 0.2);
}
.shell-chpw-field input.shell-plain-input {
  padding: 0 12px;
}
.shell-chpw-field input.shell-plain-input[readonly] {
  background: #f1f5f9;
  color: #475569;
  cursor: default;
}
.shell-chpw-field textarea.shell-plain-input {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  min-height: 68px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 400;
  color: #0f172a;
  background: #fff;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  line-height: 1.4;
}
.shell-chpw-field textarea.shell-plain-input:focus {
  outline: none;
  border-color: #15733c;
  box-shadow: 0 0 0 1px rgba(21, 115, 60, 0.2);
}
.shell-chpw-field textarea.shell-plain-input[readonly] {
  background: #f1f5f9;
  color: #475569;
  cursor: default;
  resize: none;
}
.shell-chpw-eye {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #94a3b8;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.shell-chpw-eye:hover {
  color: #64748b;
  background: #f1f5f9;
}
.shell-chpw-eye svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.shell-chpw-eye[aria-pressed="true"] {
  color: #15733c;
}
.shell-chpw-msg {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
}
.shell-chpw-msg.hidden {
  display: none !important;
}
.shell-chpw-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  margin-top: 2px;
}
.shell-chpw-btn {
  border-radius: 8px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  min-height: 40px;
}
.shell-chpw-btn-cancel {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
}
.shell-chpw-btn-cancel:hover {
  background: #fff;
}
.shell-chpw-btn-save {
  border: 0;
  background: #15733c;
  color: #fff;
}
.shell-chpw-btn-save:hover {
  background: #0f5a2e;
}
.shell-chpw-btn-save:disabled {
  opacity: 0.65;
  cursor: wait;
}

.shell-nset-card {
  max-width: 420px;
}
.shell-nset-body {
  padding: 16px 18px 18px;
  display: grid;
  gap: 12px;
}
.shell-nset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
}
.shell-nset-row:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.shell-nset-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.shell-nset-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
}
.shell-nset-hint {
  font-size: 0.74rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.35;
}
.shell-nset-switch {
  position: relative;
  flex-shrink: 0;
}
.shell-nset-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.shell-nset-switch__track {
  display: block;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #94a3b8;
  transition: background 0.15s ease;
  position: relative;
}
.shell-nset-switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
  transition: transform 0.15s ease;
}
.shell-nset-switch input:checked + .shell-nset-switch__track {
  background: #15733c;
}
.shell-nset-switch input:checked + .shell-nset-switch__track::after {
  transform: translateX(18px);
}
.shell-nset-switch input:focus-visible + .shell-nset-switch__track {
  outline: 2px solid #15733c;
  outline-offset: 2px;
}

/* ── Mobile: drawer menu (ẩn sidebar, mở bằng nút header) ── */
@media (max-width: 900px) {
  html,
  body {
    overflow-x: clip;
    max-width: 100%;
    height: auto;
  }
  .shell-app {
    max-width: 100%;
    overflow-x: clip;
    overflow-y: visible;
  }
  .shell-main {
    max-width: 100%;
    min-width: 0;
    overflow: visible;
    flex: 1 1 auto;
    min-height: auto;
  }

  .shell-topbar {
    position: sticky;
    top: 0;
    z-index: 110;
  }

  .shell-topbar-menu-btn { display: inline-flex; }
  .shell-topbar {
    padding: 0 10px;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
  }
  .shell-topbar-left {
    flex: 0 0 auto;
    min-width: 0;
    gap: 8px;
  }
  .shell-announce {
    display: none !important;
  }
  .shell-brand,
  .shell-brand__name,
  .shell-topbar-divider,
  .shell-topbar-title {
    display: none;
  }
  .shell-topbar-right {
    gap: 6px;
    flex: 0 0 auto;
    min-width: 0;
    justify-content: flex-end;
    overflow: visible;
  }
  .shell-topbar-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }
  .shell-notify-btn {
    width: 40px;
    height: 40px;
  }
  .shell-notify-btn svg {
    width: 24px;
    height: 24px;
  }
  .shell-notify-wrap {
    overflow: visible;
    z-index: 125;
  }
  .shell-notify-dropdown {
    position: fixed;
    top: calc(var(--shell-header-h) + 8px);
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    z-index: 140;
  }
  .shell-flag {
    flex-shrink: 0;
  }
  .shell-user-wrap {
    min-width: 0;
    max-width: none;
    flex-shrink: 0;
    overflow: visible;
    z-index: 120;
  }
  .shell-user-dropdown {
    z-index: 130;
    min-width: 200px;
  }
  .shell-user-card {
    min-width: 0;
    max-width: none;
    padding: 0;
  }
  .shell-user-info {
    max-width: none;
    width: max-content;
  }
  .shell-user-name {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }

  .shell-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(var(--shell-menu-w), 86vw) !important;
    height: 100vh;
    max-height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1), box-shadow 0.32s ease;
    z-index: 150;
    box-shadow: none;
    will-change: transform;
    display: flex;
    flex-direction: column;
  }
  .shell-app.is-mobile-nav-open .shell-sidebar {
    transform: translateX(0);
    box-shadow: 8px 0 28px rgba(15, 23, 42, 0.18);
  }

  .shell-module-block.is-active .shell-module-row--parent,
  .shell-module-block.is-active .shell-module-nav > .shell-nav-link,
  .shell-module-block.is-active .shell-module-nav > .shell-nav-group {
    animation: shell-module-in 0.3s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  }

  .shell-sidebar-icons { display: none !important; }
  /* Tránh SVG trong drawer bị max-width:100% / intrinsic size thành khối to */
  .shell-sidebar svg {
    max-width: none;
  }
  .shell-sidebar-menu {
    display: block !important;
    position: static !important;
    width: 100% !important;
    flex: 1;
    min-height: 0;
    height: auto;
    box-shadow: none !important;
    border-right: none;
    z-index: auto;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .shell-mobile-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    height: auto;
    min-height: 48px;
    padding: 10px 12px 8px 16px;
    border-bottom: none;
    background: #0f5a2e;
  }

  .shell-mobile-drawer-greet {
    flex: 1;
    min-width: 0;
    display: block;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
  }

  .shell-mobile-drawer-hello {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
  }

  .shell-mobile-drawer-id {
    font-weight: 700;
    color: #fff;
  }

  .shell-mobile-drawer-title {
    display: none;
  }

  .shell-mobile-drawer-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    margin: 0;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s ease, color 0.15s ease;
  }

  .shell-mobile-drawer-close:hover,
  .shell-mobile-drawer-close:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    outline: none;
  }

  .shell-mobile-drawer-close:active {
    background: rgba(255, 255, 255, 0.22);
  }

  .shell-mobile-drawer-close svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
  }

  .shell-mobile-drawer-search {
    flex-shrink: 0;
    padding: 0 12px 8px;
    background: #0f5a2e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .shell-mobile-drawer-search__field {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-sizing: border-box;
  }

  .shell-mobile-drawer-search__field svg,
  .shell-mobile-drawer-search__ico {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    min-width: 16px;
    min-height: 16px;
    flex: 0 0 16px;
    display: block;
    color: rgba(255, 255, 255, 0.85);
    stroke: currentColor;
    fill: none;
    overflow: visible;
  }

  .shell-mobile-drawer-search__input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 5px 0;
  }

  .shell-mobile-drawer-search__input::placeholder {
    color: rgba(255, 255, 255, 0.55);
  }

  .shell-mobile-drawer-search__input::-webkit-search-cancel-button {
    filter: invert(1);
    opacity: 0.7;
  }

  .shell-menu-search-results {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 7px 10px 10px;
  }

  .shell-menu-search-link {
    display: flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 7px;
    text-decoration: none;
    color: #15733c;
    background: #fff;
    border: 1px solid #d8ebe0;
    font-size: 0.7rem;
    font-weight: 600;
  }

  .shell-menu-search-link .shell-menu-search-link__line,
  .shell-menu-search-link .shell-nav-link__text,
  .shell-menu-search-link .shell-menu-search-link__meta {
    color: inherit;
  }

  .shell-menu-search-link__line {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
  }

  .shell-menu-search-link.is-active {
    border-color: #15733c;
    background: #15733c;
    color: #fff;
  }

  .shell-menu-search-link.is-active .shell-menu-search-link__line {
    color: #fff;
  }

  .shell-menu-search-empty {
    margin: 10px;
    padding: 10px;
    border-radius: 7px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.7rem;
    text-align: center;
  }

  /* Ô tìm kiếm chỉ hiện trên mobile drawer */
  .shell-mobile-drawer-search {
    display: block;
  }

  .shell-module-block.is-active .shell-module-row--parent {
    margin-top: 6px;
  }

  .shell-sidebar-toggle { display: none !important; }
  .shell-icon-flyout { display: none !important; }

  .shell-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 140;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
  }
  .shell-app.is-mobile-nav-open .shell-nav-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.shell-nav-locked { overflow: hidden; }

  .shell-usd {
    display: inline-flex;
    gap: 4px;
    padding: 3px 6px;
    font-size: 0.68rem;
    border-radius: 6px;
    flex-shrink: 0;
  }
  .shell-usd__label {
    font-size: 0.58rem;
  }
  .shell-usd__value {
    font-size: 0.68rem;
  }
  .shell-user-info { max-width: none; width: max-content; }
  .shell-user-subline { font-size: 0.62rem; }

  /* ── Nội dung trang: scroll theo document, header sticky theo viewport ── */
  .shell-content,
  .shell-app.is-sidebar-collapsed .shell-content,
  .shell-content:has(.fb-page),
  .shell-app.is-sidebar-collapsed .shell-content:has(.fb-page),
  .shell-content:has(.shell-page),
  .shell-app.is-sidebar-collapsed .shell-content:has(.shell-page) {
    padding: 10px 10px 24px;
    overflow-x: clip;
    overflow-y: visible;
    flex: 1 1 auto;
    min-height: auto;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .shell-content > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .shell-content img,
  .shell-content video,
  .shell-content iframe,
  .shell-content svg {
    max-width: 100%;
  }
  .shell-content table {
    max-width: 100%;
  }
  .shell-content:has(.inv-view-page),
  .shell-app.is-sidebar-collapsed .shell-content:has(.inv-view-page) {
    overflow-x: visible;
  }
  .shell-content:has(.inv-view-page) table.win-tbl,
  .shell-content:has(.inv-view-page) table.win-sum-wrap {
    max-width: none;
  }
  .coming-soon {
    margin: 20px auto;
    padding: 28px 18px;
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .shell-sidebar,
  .shell-nav-backdrop,
  .shell-nav-sub,
  .shell-menu-icon__bar,
  .shell-nav-group-btn .chev {
    transition: none !important;
  }
  .shell-module-block.is-active .shell-module-row--parent,
  .shell-module-block.is-active .shell-module-nav > .shell-nav-link,
  .shell-module-block.is-active .shell-module-nav > .shell-nav-group,
  .shell-nav-group.is-open .shell-nav-sub a,
  .shell-nav-badge,
  .shell-nav-badge::after {
    animation: none !important;
  }
}

/* Toast toàn app - cùng form .ffw-toast* như Tình trạng đặt chỗ (gửi mail thành công) */
.ffw-toast-wrap {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 36px));
}

.ffw-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  pointer-events: auto;
  animation: ffw-toast-in 0.22s ease forwards;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
}

.ffw-toast--out {
  animation: ffw-toast-out 0.2s ease forwards;
}

.ffw-toast--success {
  border-color: #86efac;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 55%);
}

.ffw-toast--error {
  border-color: #fca5a5;
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 55%);
}

.ffw-toast--info {
  border-color: #86efac;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 55%);
}

.ffw-toast__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
}

.ffw-toast__icon--success,
.ffw-toast__icon--notify {
  background: #dcfce7;
  color: #15733c;
}

.ffw-toast__icon--error {
  background: #fee2e2;
  color: #dc2626;
}

.ffw-toast__body {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.ffw-toast__title {
  margin: 0 0 4px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.ffw-toast__msg {
  margin: 0;
  font-size: 0.82rem;
  color: #475467;
  line-height: 1.45;
}

.ffw-toast--success .ffw-toast__title,
.ffw-toast--info .ffw-toast__title {
  color: #14532d;
}

.ffw-toast--error .ffw-toast__title {
  color: #991b1b;
}

.ffw-toast__close {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 0 0 4px;
  cursor: pointer;
  margin: -2px -2px 0 0;
}

.ffw-toast__close:hover {
  color: #64748b;
}

@keyframes ffw-toast-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ffw-toast-out {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

@media (max-width: 520px) {
  .ffw-toast-wrap {
    right: 10px;
    left: 10px;
    bottom: 10px;
    max-width: none;
  }
}

.shell-notify-btn--pulse {
  animation: shell-notify-pulse 0.55s ease 3;
}

@keyframes shell-notify-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); color: var(--shell-blue, #15733c); }
}

/* Tắt blur / glass toàn site (mọi kích thước) - tránh UI nhìn mờ */
*,
*::before,
*::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
