/* =========================================================
   ChốtLive / Susu – Thiết kế Giao diện Chuẩn UI/UX (Web & iOS App IPA)
   Phong cách Tối giản, Ấm áp, Tinh tế & Chuyên nghiệp
   Bảng màu: Nền kem ấm (#f6f4f0), Thẻ trắng (#fff), Điểm nhấn Cam (#f58c42 / #eb6b1e)
   ========================================================= */

:root {
  --font: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  --bg-app: #f6f4f0;
  --bg-card: #ffffff;
  --bg-sidebar: #f6f4f0;
  --border: #ebe7e1;
  --border-light: #f1ede7;

  /* Điểm nhấn & Trạng thái */
  --primary-orange: #f58c42;
  --primary-orange-strong: #eb6b1e;
  --primary-orange-hover: #e57227;
  --orange-soft: #fdeee4;
  --orange-soft-text: #c25115;

  --green-badge: #e2f5ea;
  --green-badge-text: #15803d;

  --text-main: #1b1917;
  --text-sub: #746f6a;
  --text-muted: #9e9892;
  --text-light: #b5b0aa;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-pill: 9999px;

  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(0, 0, 0, 0.025);
  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.025), 0 6px 20px rgba(0, 0, 0, 0.02);
  --shadow-modal: 0 20px 48px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font);
  background-color: var(--bg-app);
  color: var(--text-main);
  font-size: 14.5px;
  line-height: 1.48;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  transition: all 0.16s ease;
}

input, select, textarea {
  outline: none;
}

.vnd-underline {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ================== CẤU TRÚC ỨNG DỤNG (SIDEBAR + MAIN) ================== */
.app-container {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-app);
}

/* Sidebar bên trái (Web Desktop) */
.app-sidebar {
  width: 226px;
  min-width: 226px;
  background-color: var(--bg-sidebar);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(0, 0, 0, 0.045);
  user-select: none;
}

.shop-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  margin-bottom: 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
}

.shop-profile-card:hover {
  background: rgba(0, 0, 0, 0.03);
}

.shop-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fde5d2;
  color: #2b241f;
  font-weight: 800;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.shop-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shop-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-handle {
  font-size: 12px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item-btn {
  display: flex;
  align-items: center;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  color: #4b4744;
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
  transition: all 0.15s ease;
}

.nav-item-btn:hover {
  background: #ede9e3;
  color: var(--text-main);
}

.nav-item-btn.active {
  background: #fdeee3;
  color: var(--primary-orange-strong);
  font-weight: 700;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.quick-printer-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-sub);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.quick-printer-badge:hover {
  background: #fff;
}

.printer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  flex-shrink: 0;
}

/* Main Content Area */
.app-main {
  flex: 1;
  padding: 24px 36px 48px;
  max-width: 1480px;
  overflow-y: auto;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
  animation: fadeIn 0.18s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header trang chung */
.view-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}

.header-left .header-sub {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sub);
  margin-bottom: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.header-left .header-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  line-height: 1.15;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-left .header-title-subpage {
  font-size: 21px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Nút & Chips */
.btn-orange-pill {
  background-color: var(--primary-orange);
  color: #1f1b18;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-orange-pill:hover {
  background-color: #ef8035;
}

.btn-orange-pill:active {
  transform: scale(0.98);
}

.btn-outline-pill {
  background: #ffffff;
  border: 1px solid #e6e1d9;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-outline-pill:hover {
  background: #fbfaf8;
  border-color: #d4cdc3;
}

.btn-ghost-pill {
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
}

.btn-ghost-pill:hover {
  background: #ebe7e1;
  color: var(--text-main);
}

.back-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #ebe6de;
  color: var(--text-main);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  flex-shrink: 0;
}

.back-header-btn:hover {
  background: #f5f2ed;
}

/* Ô tìm kiếm */
.header-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #ece7df;
  border-radius: var(--radius-pill);
  padding: 0 16px;
  height: 44px;
  width: 280px;
  transition: border-color 0.15s;
}

.header-search-box:focus-within {
  border-color: var(--primary-orange);
}

.search-icon-svg {
  color: var(--text-sub);
  flex-shrink: 0;
}

.header-search-box input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 14px;
  color: var(--text-main);
}

.header-search-box input::placeholder {
  color: #8c8680;
}

/* Filter Chip Pills */
.filter-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.chip-pill {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  border: 1px solid #ece7df;
  background: #ffffff;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.chip-pill:hover {
  border-color: #d5cfc6;
}

.chip-pill.active {
  background: var(--primary-orange);
  color: #1f1b18;
  border-color: var(--primary-orange);
  font-weight: 700;
}

/* Thẻ Card trắng chung */
.clean-white-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

/* Avatar tròn chuẩn mẫu (Ấm cam nhạt & Xám nhạt) */
.user-circle-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ebedf0;
  color: #262422;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.3px;
}

.user-circle-avatar.warm {
  background: #fde6d4;
  color: #262422;
}

.badge-pill-tag {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
}

.badge-tag-new {
  background: var(--green-badge);
  color: var(--green-badge-text);
}

.badge-tag-loyal {
  background: var(--orange-soft);
  color: var(--orange-soft-text);
}

/* ================== 1. TAB DOANH SỐ (SCREEN 1) ================== */
.sales-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.live-indicator-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ffffff;
  border: 1px solid #ece7df;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  box-shadow: var(--shadow-subtle);
}

.live-indicator-tag .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e13b3b;
  animation: pulseRed 1.6s infinite;
}

@keyframes pulseRed {
  0% { box-shadow: 0 0 0 0 rgba(225, 59, 59, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(225, 59, 59, 0); }
  100% { box-shadow: 0 0 0 0 rgba(225, 59, 59, 0); }
}

/* Thẻ Cam Hero Doanh thu hôm nay (Screen 1) */
.hero-revenue-card {
  background: #f58c42;
  border-radius: 22px;
  padding: 22px 24px;
  color: #181615;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.hero-rev-label {
  font-size: 14.5px;
  font-weight: 600;
  color: #2b241f;
  margin-bottom: 6px;
}

.hero-rev-amount {
  font-size: 38px;
  font-weight: 800;
  color: #181615;
  letter-spacing: -0.8px;
  line-height: 1.12;
  margin-bottom: 14px;
}

.hero-growth-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-growth-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #1c1917;
  color: #34d399;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
}

.hero-growth-compare {
  font-size: 13.5px;
  font-weight: 600;
  color: #261f1a;
}

/* 2 Thẻ phụ bên dưới (Khách hôm nay, Doanh thu tháng 10) */
.sub-stats-2col {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 12px;
  margin-bottom: 14px;
}

.stat-white-box {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #eee9e2;
  padding: 18px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-box-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-sub);
  margin-bottom: 10px;
  line-height: 1.3;
}

.stat-box-icon {
  width: 18px;
  height: 18px;
  color: var(--text-sub);
  flex-shrink: 0;
}

.stat-box-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.15;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.stat-box-number-money {
  font-size: 21px;
}

.stat-box-sub {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

.stat-box-sub.orange {
  color: #cc5c18;
}

.stat-box-sub.green {
  color: #15803d;
}

/* Biểu đồ Doanh thu theo ngày (Screen 1) */
.daily-barchart-card {
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid #eee9e2;
  padding: 20px 20px 18px;
}

.barchart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 30px;
}

.barchart-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.chart-toggle-group {
  display: inline-flex;
  background: #f5f3ef;
  border-radius: var(--radius-pill);
  padding: 3px;
}

.chart-toggle-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

.chart-toggle-btn.active {
  background: var(--primary-orange);
  color: #1c1917;
  font-weight: 700;
}

.barchart-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 170px;
  padding: 24px 6px 6px;
}

.barchart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 12%;
  position: relative;
  height: 100%;
  justify-content: flex-end;
  cursor: pointer;
}

.barchart-pill-bar {
  width: 100%;
  max-width: 36px;
  border-radius: 8px;
  background: #ced3d9;
  transition: all 0.25s ease;
}

.barchart-col.highlight .barchart-pill-bar {
  background: #ea6c1e;
}

.barchart-tooltip-val {
  position: absolute;
  top: -24px;
  font-size: 12px;
  font-weight: 800;
  color: #cc5610;
  white-space: nowrap;
}

.barchart-days-labels-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 6px 0;
}

.barchart-day-label {
  width: 12%;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  text-align: center;
}

.barchart-day-label.highlight {
  color: var(--text-main);
  font-weight: 800;
}

/* ================== 2. TAB BÌNH LUẬN & TIMELINE 24H (SCREEN 2) ================== */
.btn-new-live-top {
  padding: 11px 20px;
  font-size: 14.5px;
}

.date-navigator-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.nav-circle-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #ece7df;
  color: var(--text-main);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-circle-arrow:hover {
  background: #f5f2ed;
}

.btn-date-nav-pill {
  flex: 1;
  max-width: 360px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  border: 1.5px solid #2b2826;
  background: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
}

.sessions-overview-box {
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid #eee9e2;
  padding: 16px;
  margin-bottom: 20px;
}

.live-metrics-4tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.tile-metric-item {
  background: #faf9f6;
  border-radius: 14px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tile-icon-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tile-bold-num {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
}

.tile-lbl-sub {
  font-size: 13.5px;
  color: var(--text-sub);
  margin-left: 3px;
}

/* Thanh Dòng Thời Gian 24 Giờ (Screen 2) */
.timeline-scrubber-wrap {
  padding: 4px 4px 2px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-track-bar {
  width: 100%;
  height: 8px;
  background: #ece9e3;
  border-radius: var(--radius-pill);
  position: relative;
}

.timeline-live-chunk {
  position: absolute;
  top: -3px;
  height: 14px;
  background: #f58c42;
  border-radius: var(--radius-pill);
}

.timeline-cursor-line {
  position: absolute;
  top: -7px;
  width: 2.5px;
  height: 22px;
  background: #eb6b1e;
  border-radius: 2px;
}

.timeline-hours-markers {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-sub);
  font-weight: 500;
}

.sessions-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 2px 10px;
}

.sessions-section-heading h3 {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text-main);
}

.sessions-section-heading span {
  font-size: 13.5px;
  color: var(--text-sub);
}

.sessions-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.session-row-card {
  display: flex;
  align-items: stretch;
  gap: 12px;
  cursor: pointer;
}

.session-time-col {
  width: 48px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 4px 0;
}

.session-time-main {
  font-weight: 800;
  font-size: 15px;
  color: var(--text-main);
}

.session-time-stem {
  width: 2px;
  flex: 1;
  min-height: 14px;
  background: #dad5cd;
  margin: 3px 0 3px 16px;
}

.session-time-status {
  font-size: 12px;
  color: #d93829;
  font-weight: 700;
  line-height: 1.2;
}

.session-time-end {
  font-size: 13px;
  color: var(--text-sub);
  font-weight: 500;
}

.session-info-bubble {
  flex: 1;
  background: #ffffff;
  border: 1px solid #ece7df;
  border-radius: 18px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.session-info-bubble.active-live-bubble {
  border: 1.5px solid #f09352;
}

.session-info-bubble:hover {
  background: #fdfaf6;
}

.session-bubble-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.session-bubble-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.session-bubble-title {
  font-weight: 800;
  font-size: 15.5px;
  color: var(--text-main);
}

.badge-live-tag {
  background: #fdece8;
  color: #d93829;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.live-red-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e13b3b;
}

.session-bubble-duration {
  font-size: 13px;
  color: var(--text-sub);
  font-weight: 500;
}

.session-bubble-stats-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13.5px;
  color: var(--text-sub);
}

.session-bubble-stats-row span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.session-bubble-stats-row b {
  color: var(--text-main);
  font-weight: 700;
}

.session-chevron {
  font-size: 20px;
  color: var(--text-sub);
}

/* Chi tiết luồng bình luận trực tiếp */
.live-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(350px, 1fr);
  gap: 24px;
  align-items: start;
}

.live-session-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

.live-session-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 8px;
  flex-wrap: wrap;
}

.session-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.session-subtitle {
  font-size: 12.5px;
  color: var(--text-sub);
  margin-top: 3px;
}

.session-stats-right {
  font-size: 13px;
  color: var(--text-sub);
}

.comment-list-stream {
  display: flex;
  flex-direction: column;
}

.comment-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px;
  border-bottom: 1px solid #f5f2ec;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s ease;
}

.comment-row-item:hover {
  background: #fbf9f6;
}

.comment-row-item.selected {
  background: #fdf4ec;
}

.comment-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.comment-content-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.comment-user-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.comment-user-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
}

.comment-body-text {
  font-size: 13.5px;
  color: #3b3734;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comment-right-col {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  flex-shrink: 0;
}

.comment-time-right {
  font-size: 12px;
  color: var(--text-sub);
}

.btn-cmt-quick-print {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--primary-orange);
  color: #1f1b18;
  border-radius: var(--radius-pill);
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
}

.btn-cmt-quick-print.printed {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Panel Bên Phải: "Bình luận chốt đơn" */
.order-closed-panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 22px;
}

.panel-header-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.panel-header-sub {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 2px;
  margin-bottom: 18px;
}

.closed-customer-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 16px;
}

.closed-cust-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.closed-cust-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.closed-cust-handle {
  font-size: 12.5px;
  color: var(--text-sub);
}

.closed-cmt-count-badge {
  background: #f4f0eb;
  color: #555;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.closed-summary-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.summary-metric-box {
  display: flex;
  flex-direction: column;
}

.metric-lbl {
  font-size: 12.5px;
  color: var(--text-sub);
  margin-bottom: 2px;
}

.metric-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.closed-section-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

.closed-comments-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.closed-cmt-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.closed-cmt-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 13.5px;
}

.closed-cmt-time {
  font-size: 12px;
  color: var(--text-sub);
}

.closed-item-pill {
  background: #fbfaf8;
  border: 1px solid #ebe6df;
  border-radius: var(--radius-md);
  padding: 9px 14px;
  font-size: 13.5px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ================== 3. TAB KHÁCH HÀNG (SCREEN 4 & SCREEN 9) ================== */
.customers-list-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.customer-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #eee9e2;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.customer-row-item:hover {
  background: #fdfcfa;
}

.cust-row-left {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.cust-row-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cust-row-title-line {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.cust-name {
  font-weight: 800;
  font-size: 15.5px;
  color: var(--text-main);
}

.cust-handle-time {
  font-size: 13px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cust-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  margin-left: 10px;
}

.cust-total-spent {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text-main);
}

.cust-orders-count {
  font-size: 12.5px;
  color: var(--text-sub);
  margin-top: 2px;
}

/* View Hồ sơ khách hàng (Screen 9) */
.profile-layout-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1.1fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: start;
}

.profile-card-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-summary-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #eee9e2;
  padding: 20px;
}

.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.profile-3metrics-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr 1fr;
  padding-top: 16px;
  border-top: 1px solid #f1ece5;
}

.profile-metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-right: 1px solid #f1ece5;
  padding: 0 6px;
}

.profile-metric-item:first-child {
  align-items: center;
}

.profile-metric-item:last-child {
  border-right: none;
}

.profile-metric-num {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
}

.profile-metric-lbl {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 2px;
}

/* Thẻ địa chỉ nhận hàng (Screen 9) */
.profile-address-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #eee9e2;
  padding: 20px;
}

.profile-address-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.profile-address-header h3 {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text-main);
}

.btn-edit-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  background: #f7f5f0;
}

.btn-edit-link:hover {
  background: #ece8e1;
}

.address-rows-list {
  display: flex;
  flex-direction: column;
}

.address-row {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #f4f0eb;
  font-size: 14px;
  align-items: start;
}

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

.address-label {
  color: var(--text-sub);
  font-size: 13.5px;
  line-height: 1.4;
}

.address-value {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.4;
}

/* Thẻ lịch sử mua hàng (Screen 9) */
.profile-history-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #eee9e2;
  padding: 20px;
}

.history-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.history-card-header h3 {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text-main);
}

.history-card-header span {
  font-size: 13px;
  color: var(--text-sub);
}

.history-orders-list {
  display: flex;
  flex-direction: column;
}

.history-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid #f4f0eb;
}

.history-order-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.hist-order-date {
  display: flex;
  flex-direction: column;
  min-width: 58px;
}

.hist-date-main {
  font-weight: 800;
  font-size: 14.5px;
  color: var(--text-main);
}

.hist-time-sub {
  font-size: 12px;
  color: var(--text-sub);
}

.hist-items-count {
  font-size: 13.5px;
  color: var(--text-sub);
  flex: 1;
  padding-left: 12px;
}

.hist-right-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.hist-amount {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.badge-order-status {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
}

.status-new-badge {
  background: #fdeee4;
  color: #c25115;
}

.status-printed-badge {
  background: #f2f1ee;
  color: #4b4743;
}

.status-done-badge {
  background: #e2f5ea;
  color: #15803d;
}

/* ================== 4. TAB ĐƠN HÀNG (SCREEN 5 & SCREEN 8) ================== */
.orders-header-top {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 14px;
}

.orders-search-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.flex-1-search {
  flex: 1;
  width: auto !important;
}

.btn-filter-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #ece7df;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  flex-shrink: 0;
}

.orders-list-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Thẻ Đơn hàng chuẩn Screen 5 */
.order-card-item {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #eee9e2;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.order-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.order-card-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.order-card-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.order-cust-name {
  font-weight: 800;
  font-size: 16px;
  color: var(--text-main);
  margin-bottom: 2px;
}

.order-meta-sub {
  font-size: 13px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-card-price-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.order-total-price {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
}

.order-card-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-ord-card-print {
  flex: 1;
  height: 44px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.btn-ord-card-print.is-new {
  background: var(--primary-orange);
  color: #1c1917;
}

.btn-ord-card-print.is-printed {
  background: #ffffff;
  border: 1px solid #e6e1d9;
  color: var(--text-main);
}

.btn-ord-card-ship {
  flex: 1;
  height: 44px;
  border-radius: var(--radius-pill);
  background: #ffffff;
  border: 1px solid #e6e1d9;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.btn-ord-card-more {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e6e1d9;
  color: var(--text-main);
  font-size: 18px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* View Chi tiết đơn hàng (Screen 8) */
.order-detail-cust-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #eee9e2;
  padding: 18px;
  margin-bottom: 14px;
  cursor: pointer;
}

.order-detail-cust-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-cust-box {
  display: flex;
  align-items: center;
  gap: 13px;
}

.order-detail-cust-divider {
  height: 1px;
  background: #f2ede6;
  margin: 14px 0 12px;
}

.detail-created-time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-sub);
}

.order-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 20px;
  align-items: start;
}

.order-items-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #eee9e2;
  padding: 18px;
}

.items-card-title {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.product-lines-list {
  display: flex;
  flex-direction: column;
}

.product-line-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid #f4f0eb;
  font-size: 14.5px;
}

.product-line-row:last-child {
  border-bottom: none;
}

.prod-left-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prod-idx-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f4f2ee;
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prod-name {
  font-weight: 800;
  color: var(--text-main);
}

.prod-calc {
  color: var(--text-sub);
  font-size: 13.5px;
}

.prod-total {
  font-weight: 800;
  color: var(--text-main);
}

.order-total-highlight-row {
  background: #fdf7f0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 800;
}

.order-total-highlight-row .total-sum {
  font-size: 19px;
  font-weight: 800;
}

.order-detail-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-detail-edit-main {
  width: 100%;
  height: 50px;
  font-size: 15px;
  font-weight: 800;
}

.detail-bottom-3btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.detail-bottom-3btns button {
  height: 44px;
  padding: 0 8px;
  font-size: 13.5px;
  font-weight: 700;
}

.btn-detail-del {
  color: #c8322b !important;
}

/* ================== 5. TAB TÔI (SCREEN 6) ================== */
.settings-2col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.settings-section-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-section-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-sub);
  padding-left: 2px;
}

.settings-white-group-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #eee9e2;
  overflow: hidden;
}

.accounts-cards-list {
  display: flex;
  flex-direction: column;
}

.account-item-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid #f3efe9;
  background: #ffffff;
  cursor: pointer;
}

.acc-box-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.acc-name-handle {
  display: flex;
  flex-direction: column;
}

.acc-name {
  font-weight: 800;
  font-size: 15px;
  color: var(--text-main);
}

.acc-handle {
  font-size: 13px;
  color: var(--text-sub);
}

.badge-in-use {
  color: #15803d;
  font-size: 13px;
  font-weight: 700;
}

.acc-radio-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.8px solid #d5cfc7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.acc-radio-circle.active {
  background: var(--primary-orange);
  border-color: var(--primary-orange);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.btn-add-account-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #ffffff;
  text-align: left;
}

.dashed-plus-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px dashed #e29965;
  color: #cb5a16;
  font-size: 22px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.add-acc-label {
  color: #cb5a16;
  font-size: 15px;
  font-weight: 700;
}

/* Menu Cài đặt (Screen 6) */
.settings-menu-list {
  display: flex;
  flex-direction: column;
}

.setting-menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #f3efe9;
  cursor: pointer;
}

.setting-menu-row:last-child {
  border-bottom: none;
}

.setting-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.setting-peach-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fef0e6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.setting-row-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.setting-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row-chevron {
  font-size: 20px;
  color: var(--text-sub);
  line-height: 1;
}

.settings-bottom-bar {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.btn-logout-card {
  width: 100%;
  height: 50px;
  background: #ffffff;
  border: 1px solid #eee9e2;
  border-radius: 18px;
  color: #c8322b;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.app-version-text {
  font-size: 13px;
  color: var(--text-sub);
}

/* ================== MODAL & BOTTOM SHEET DIALOGS (SCREEN 3 & SCREEN 7) ================== */
.app-modal-dialog {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 500px;
  width: 92vw;
  margin: auto;
  outline: none;
}

.app-modal-dialog::backdrop {
  background: rgba(20, 18, 16, 0.48);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.modal-content-card {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: var(--shadow-modal);
  padding: 22px 22px 24px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.sheet-drag-handle {
  width: 42px;
  height: 4px;
  background: #d8d3cb;
  border-radius: 99px;
  margin: 0 auto 14px;
}

.btn-modal-close {
  position: absolute;
  top: 22px;
  right: 20px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f5f3ef;
  color: var(--text-main);
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-title-main {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}

.modal-subtitle-text {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 3px;
  margin-bottom: 18px;
}

/* Xem lại thời điểm (Screen 3) */
.quick-time-chips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.quick-time-chips-grid .chip-pill {
  padding: 10px 6px;
  font-size: 13.5px;
  text-align: center;
  justify-content: center;
}

.calendar-widget-box {
  margin: 10px 0 14px;
}

.cal-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 12px;
}

.cal-nav-arrow {
  font-size: 22px;
  color: var(--text-main);
  padding: 2px 6px;
}

.cal-grid-table {
  width: 100%;
  text-align: center;
  border-collapse: collapse;
}

.cal-grid-table th {
  font-size: 12.5px;
  color: var(--text-sub);
  font-weight: 600;
  padding: 8px 4px;
}

.cal-grid-table td {
  padding: 5px 2px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}

.cal-grid-table td span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.cal-grid-table td.active span {
  background: var(--primary-orange) !important;
  color: #1c1917 !important;
  font-weight: 800;
}

.cal-grid-table td.muted {
  color: #aba6a0;
}

.time-range-inputs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 10px 0 20px;
}

.time-box-input {
  background: #f5f3ef !important;
  border: none !important;
  font-weight: 800;
  font-size: 15px !important;
  padding: 12px 14px !important;
  border-radius: 12px !important;
}

/* Action Sheet 3 chấm đơn hàng (Screen 7) */
.order-action-sheet-options {
  display: flex;
  flex-direction: column;
  margin: 8px 0 16px;
}

.sheet-option-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid #f3efe9;
  cursor: pointer;
}

.sheet-option-item:last-child {
  border-bottom: none;
}

.sheet-opt-circle-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fef0e6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sheet-opt-circle-icon.danger {
  background: #fdeceb;
}

.sheet-opt-title {
  font-weight: 800;
  font-size: 15px;
  color: var(--text-main);
}

.sheet-opt-sub {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 1px;
}

.sheet-option-item.danger .sheet-opt-title {
  color: #c8322b;
}

.btn-sheet-close-grey {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-pill);
  background: #f4f2ee;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 800;
}

/* Form inputs chung trong modal */
.form-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 16px;
  margin-bottom: 10px;
}

.form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-field-group label {
  font-size: 13px;
  color: var(--text-sub);
  font-weight: 500;
}

.form-field-group label span.req {
  color: #ef4444;
}

.form-field-input {
  background: #ffffff;
  border: 1px solid #ded9d1;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-main);
}

.form-field-input:focus {
  border-color: var(--primary-orange);
}

.form-select-trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.saved-live-ids-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.saved-live-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid #ebe6df;
  border-radius: var(--radius-md);
  background: #fff;
}

.divider-with-text {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-sub);
  font-size: 12px;
  margin: 16px 0;
}

.divider-with-text::before,
.divider-with-text::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #ece7df;
}

.divider-with-text span {
  padding: 0 12px;
}

.input-with-action {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-action input {
  padding-right: 60px;
}

.btn-inside-paste {
  position: absolute;
  right: 8px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  background: #f7f4ee;
  border-radius: var(--radius-sm);
}

.checkbox-remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 20px;
  cursor: pointer;
}

.chk-custom {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-orange);
  cursor: pointer;
}

.area-tabs-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.area-breadcrumbs-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.area-ward-list {
  display: flex;
  flex-direction: column;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #f2ede7;
  border-radius: var(--radius-md);
  margin-top: 8px;
}

.area-ward-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #f6f3ee;
  cursor: pointer;
  font-size: 14px;
}

.area-ward-item.selected {
  font-weight: 700;
}

.area-selected-summary {
  font-size: 13px;
  color: var(--text-sub);
  margin: 14px 0 18px;
}

.area-selected-summary b {
  color: var(--text-main);
  display: block;
  margin-top: 4px;
}

/* Segmented Control Switcher (Desktop) */
.segmented-control-pills {
  display: inline-flex;
  background: #ede8e0;
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 3px;
}

.segment-pill-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  white-space: nowrap;
}

.segment-pill-btn.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Edit Items in Order Modal */
.edit-item-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 36px;
  gap: 10px;
  align-items: center;
  background: #fbf9f6;
  border: 1px solid #ede8e1;
  border-radius: 10px;
  padding: 10px 12px;
}

.btn-remove-item-row {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* Toast Thông báo */
.toast-web-box {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}

.toast-item {
  background: #23201e;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  animation: toastIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Thanh điều hướng dưới đáy (Mobile Navigation Bar) */
.app-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: 68px;
  padding-top: 6px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  background: #faf9f6;
  border-top: 1px solid #ece7e0;
  z-index: 120;
  justify-content: space-around;
  align-items: center;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #4a4541;
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  cursor: pointer;
  user-select: none;
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.bottom-nav-item.active {
  color: #d95d16;
  font-weight: 700;
}

/* Thanh tác vụ in nhanh nổi khi chọn khách */
.mobile-sticky-order-bar {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 520px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #f0eae0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 105;
}

.mobile-sticky-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mobile-sticky-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sticky-bar-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.sticky-bar-desc {
  font-size: 12px;
  color: var(--primary-orange-strong);
  font-weight: 700;
}

.mobile-sticky-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ================== RESPONSIVE CHUẨN MOBILE & APP IPA (SCREEN 1 -> 9) ================== */
@media (max-width: 1024px) {
  .live-layout-grid,
  .profile-layout-grid,
  .order-detail-grid,
  .settings-2col-grid,
  .sales-layout-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-sidebar,
  .desktop-only-card,
  .desktop-only-flex {
    display: none !important;
  }

  .app-bottom-nav {
    display: flex;
  }

  .app-main {
    padding: max(16px, env(safe-area-inset-top)) 16px calc(88px + env(safe-area-inset-bottom));
  }

  .view-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 14px;
  }

  .view-header-row-mobile {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .header-right-auto {
    width: auto !important;
  }

  .header-search-box {
    width: 100%;
  }

  .chips-scroll-mobile {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .chips-scroll-mobile::-webkit-scrollbar {
    display: none;
  }

  /* Bottom Sheet Dialog chuẩn iOS trên điện thoại (Screen 3 & Screen 7) */
  .bottom-sheet-dialog {
    max-width: 100vw;
    width: 100vw;
    margin: auto 0 0 0;
  }

  .bottom-sheet-dialog .modal-content-card {
    border-radius: 26px 26px 0 0;
    padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
    animation: slideUpSheet 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes slideUpSheet {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

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

  .edit-item-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .mobile-sticky-order-bar {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .toast-web-box {
    bottom: calc(80px + env(safe-area-inset-bottom));
    right: 16px;
    left: 16px;
    align-items: center;
  }
}

/* ============================================================
   KHUNG ĐĂNG NHẬP / ĐĂNG KÝ & BẢNG QUẢN TRỊ PHÂN QUYỀN (ADMIN)
   ============================================================ */
.auth-screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: radial-gradient(circle at top right, #fdf3eb 0%, #f6f4f0 60%, #efeae2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.auth-screen-overlay.hidden {
  display: none !important;
}

.auth-card-box {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border: 1px solid #ece7df;
  border-radius: 26px;
  padding: 28px 26px 24px;
  box-shadow: 0 20px 50px rgba(34, 28, 22, 0.08);
  animation: fadeScaleIn 0.22s ease;
}

@keyframes fadeScaleIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-brand-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.auth-logo-badge {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: linear-gradient(135deg, #eb6b22 0%, #cf510d 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(217, 93, 22, 0.25);
}

.auth-brand-title {
  font-size: 21px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.auth-brand-sub {
  font-size: 12.5px;
  color: var(--text-sub);
  margin-top: 2px;
}

.auth-tabs-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f5f2ed;
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 18px;
}

.auth-tab-btn {
  height: 38px;
  border-radius: 11px;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.16s ease;
}

.auth-tab-btn.active {
  background: #ffffff;
  color: var(--primary-orange-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.auth-alert-banner {
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.45;
}

.auth-alert-banner.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.auth-alert-banner.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.auth-submit-btn {
  width: 100%;
  height: 46px;
  font-size: 15px;
  font-weight: 700;
  margin-top: 6px;
}

.auth-card-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #f0ece4;
  text-align: center;
}

.btn-auth-server-link {
  background: none;
  border: none;
  color: var(--text-sub);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.btn-auth-server-link:hover {
  color: var(--primary-orange-strong);
}

/* Thẻ tài khoản đang đăng nhập trong Tab Tôi */
.current-auth-user-banner {
  background: #ffffff;
  border: 1px solid #ece7df;
  border-radius: 20px;
  padding: 18px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.auth-user-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-user-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-user-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
}

.auth-user-sub {
  font-size: 12.5px;
  color: var(--text-sub);
  margin-top: 3px;
}

.role-pill-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}

.role-pill-badge.admin {
  background: #fff1e6;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.role-pill-badge.user {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.status-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}

.status-pill-badge.active {
  background: #ecfdf5;
  color: #15803d;
}

.status-pill-badge.locked {
  background: #fef2f2;
  color: #b91c1c;
}

/* Bảng Quản lý Tài khoản của Admin */
.admin-accounts-panel {
  background: #ffffff;
  border: 1.5px solid #f0cfb4;
  border-radius: 22px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(217, 93, 22, 0.05);
}

.admin-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0ece4;
  margin-bottom: 16px;
}

.admin-panel-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-panel-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
}

.admin-count-pill {
  background: #faeadc;
  color: #c2510c;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.admin-panel-sub {
  font-size: 12.5px;
  color: var(--text-sub);
  margin-top: 4px;
}

.admin-panel-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-search-input-wrap {
  min-width: 210px;
}

.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-user-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fbf9f6;
  border: 1px solid #eee9e0;
  transition: all 0.15s ease;
  flex-wrap: wrap;
}

.admin-user-row-card.is-locked {
  background: #fff8f8;
  border-color: #fecaca;
}

.admin-user-main-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}

.admin-user-meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-sub);
}

.admin-user-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-admin-act {
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #e5e0d8;
  background: #ffffff;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.btn-admin-act:hover {
  background: #f5f2ed;
}

.btn-admin-act.lock-btn {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.btn-admin-act.unlock-btn {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.btn-admin-act.pass-btn {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #334155;
}

.btn-admin-act.del-btn {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

@media (max-width: 640px) {
  .auth-card-box {
    padding: 22px 18px 20px;
  }
  .admin-panel-header-actions {
    width: 100%;
  }
  .admin-search-input-wrap {
    flex: 1;
    min-width: 0;
  }
  .admin-user-row-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-user-actions-group {
    width: 100%;
    justify-content: flex-start;
    padding-top: 8px;
    border-top: 1px dashed #ece7df;
  }
}

/* Các live đang theo dõi cùng lúc */
.active-lives-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 12px;
  scrollbar-width: none;
}
.active-lives-strip::-webkit-scrollbar {
  display: none;
}
.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  height: 38px;
  padding: 0 6px 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}
.live-chip.all {
  padding: 0 14px;
}
.live-chip.active {
  background: #fff1e6;
  border-color: #f4a56f;
}
.live-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  flex: 0 0 auto;
}
.live-chip-dot.connecting,
.live-chip-dot.reconnecting {
  background: #f59e0b;
}
.live-chip-meta {
  font-weight: 500;
  font-size: 12px;
  color: var(--text-sub);
}
.live-chip-stop {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: #f4f1ec;
  color: var(--text-sub);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.comment-live-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-sub);
}
.btn-load-older-comments {
  width: 100%;
  margin-top: 12px;
  padding: 11px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}
.btn-load-older-comments:disabled {
  opacity: 0.6;
  cursor: default;
}
.saved-live-following {
  font-size: 12.5px;
  font-weight: 600;
  color: #15803d;
  white-space: nowrap;
}
.sync-phone-guide {
  padding: 12px 14px;
  margin-bottom: 18px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #fbf9f6;
  font-size: 13px;
}
.sync-guide-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  color: var(--text-sub);
}
.sync-guide-row b {
  color: var(--text-main);
  overflow-wrap: anywhere;
  text-align: right;
}
.sync-guide-note {
  margin-top: 8px;
  color: var(--text-sub);
  line-height: 1.45;
}
.sync-guide-url {
  margin-top: 6px;
  font-weight: 700;
  color: var(--text-main);
  overflow-wrap: anywhere;
}
