:root {
  --gs-green: #188038;
  --gs-green-light: #e6f4ea;
  --gs-blue: #1a73e8;
  --gs-blue-bg: #e8f0fe;
  --gs-red: #d93025;
  --gs-red-bg: #fce8e6;
  --gs-border: #dadce0;
  --gs-grid-border: #e0e0e0;
  --gs-header-bg: #f8f9fa;
  --gs-text: #1f1f1f;
  --gs-muted: #5f6368;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Roboto", "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  color: var(--gs-text);
  background: #fff;
  overflow: hidden;
}

/* LOGIN SCREEN */
.login-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #e6f4ea 0%, #f8f9fa 50%, #e8f0fe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.login-card {
  background: #fff;
  width: 400px;
  max-width: 92vw;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  padding: 32px 28px;
  border: 1px solid var(--gs-border);
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.login-logo-icon {
  width: 42px;
  height: 42px;
  background: var(--gs-green);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
}

.login-title {
  font-size: 19px;
  font-weight: 700;
  margin: 0;
  color: #202124;
}

.login-subtitle {
  font-size: 12.5px;
  color: var(--gs-muted);
  margin: 2px 0 0;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #3c4043;
  margin-bottom: 5px;
}

.form-input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--gs-border);
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus {
  border-color: var(--gs-blue);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.15);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid var(--gs-border);
  background: #fff;
  color: #3c4043;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}

.btn:hover {
  background: #f1f3f4;
}

.btn-primary {
  background: var(--gs-green);
  color: #fff;
  border-color: var(--gs-green);
}

.btn-primary:hover {
  background: #137333;
}

.btn-blue {
  background: var(--gs-blue);
  color: #fff;
  border-color: var(--gs-blue);
}

.btn-blue:hover {
  background: #1557b0;
}

.btn-danger {
  background: var(--gs-red);
  color: #fff;
  border-color: var(--gs-red);
}

.btn-danger:hover {
  background: #b3261e;
}

.btn-sm {
  padding: 4px 9px;
  font-size: 12px;
}

.login-hint {
  margin-top: 16px;
  padding: 10px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px dashed var(--gs-border);
  font-size: 12px;
  color: var(--gs-muted);
  line-height: 1.5;
}

/* APP SHELL */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

/* TOP BAR (GOOGLE SHEETS HEADER) */
.gs-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: #f9fbfd;
  border-bottom: 1px solid var(--gs-border);
  gap: 10px;
}

.gs-topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gs-sheet-icon {
  width: 34px;
  height: 34px;
  background: var(--gs-green);
  border-radius: 6px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.gs-sheet-select {
  font-size: 15px;
  font-weight: 600;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #202124;
  cursor: pointer;
}

.gs-sheet-select:hover, .gs-sheet-select:focus {
  border-color: var(--gs-border);
  background: #fff;
}

.gs-menu-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #edf2fa;
  border-bottom: 1px solid var(--gs-border);
  overflow-x: auto;
}

.gs-formula-bar {
  display: flex;
  align-items: center;
  height: 30px;
  background: #fff;
  border-bottom: 1px solid var(--gs-border);
  padding: 0 8px;
  gap: 8px;
}

.gs-cell-address {
  min-width: 56px;
  text-align: center;
  font-weight: 600;
  font-size: 12px;
  color: #3c4043;
  border-right: 1px solid var(--gs-border);
  padding-right: 8px;
}

.gs-fx-label {
  font-style: italic;
  font-weight: 700;
  color: var(--gs-muted);
  font-family: Georgia, serif;
  padding: 0 4px;
}

.gs-formula-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  font-family: inherit;
  color: #202124;
  height: 26px;
  min-width: 60px;
}

/* NÚT THU PHÓNG ZOOM BẢNG TÍNH */
.gs-zoom-control {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #edf2fa;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--gs-border);
  user-select: none;
  flex-shrink: 0;
}

.gs-zoom-control .btn-zoom {
  padding: 1px 7px;
  font-size: 12.5px;
  font-weight: 700;
  height: 22px;
  background: #ffffff;
  color: #171d17;
  border: 1px solid #c5cfc9;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}

.gs-zoom-control .btn-zoom:hover {
  background: #e8f0fe;
  border-color: #1a73e8;
  color: #1a73e8;
}

.gs-zoom-control #zoomPercentLabel {
  font-size: 11.5px;
  font-weight: 700;
  color: #171d17;
  min-width: 38px;
  text-align: center;
  cursor: pointer;
  padding: 0 2px;
}

.gs-zoom-control #zoomPercentLabel:hover {
  color: #1a73e8;
  text-decoration: underline;
}

/* SPREADSHEET VIEWPORT & ZOOM WRAPPER */
.gs-viewport {
  flex: 1;
  overflow: auto;
  position: relative;
  background: #fff;
  touch-action: pan-x pan-y pinch-zoom;
  -webkit-overflow-scrolling: touch;
}

.sheet-zoom-wrapper {
  transform-origin: 0 0;
  transition: transform 0.1s ease-out;
  width: max-content;
  min-width: 100%;
}

table.gs-grid {
  border-collapse: collapse;
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
  font-size: 15px;
}

table.gs-grid th,
table.gs-grid td {
  border: 1px solid #a5b2aa;
  padding: 6px 8px;
  vertical-align: top;
  position: relative;
  background: #fff;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: #171d17;
}

/* Column letters header (A, B, C...) */
table.gs-grid thead tr.col-letters th {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #f1f3f4;
  color: #5f6368;
  font-weight: 700;
  font-size: 12px;
  text-align: center;
  height: 26px;
  padding: 3px 4px;
  user-select: none;
  border: 1px solid #c5cfc9;
}

/* Frozen Row 1 (Table title headers) - Dark Green Google Sheet #2c6a44 */
table.gs-grid thead tr.row-1-frozen th {
  position: sticky;
  top: 26px;
  z-index: 25;
  background: #2c6a44;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  white-space: pre-wrap;
  line-height: 1.4;
  padding: 8px 6px;
  border: 1px solid #4c6356;
}

/* Row number column (1, 2, 3...) */
table.gs-grid th.row-num {
  position: sticky;
  left: 0;
  z-index: 20;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  background: #f1f3f4;
  color: #5f6368;
  font-weight: 600;
  font-size: 12px;
  text-align: center;
  user-select: none;
  border: 1px solid #c5cfc9;
}

table.gs-grid thead tr.col-letters th.row-num,
table.gs-grid thead tr.row-1-frozen th.row-num {
  z-index: 40;
}

/* Cells styling */
.cell-selected {
  outline: 2px solid var(--gs-blue) !important;
  outline-offset: -2px;
  z-index: 5;
}

.cell-editable {
  cursor: text;
}

.cell-editable:hover {
  background: #f4f8f2;
}

.cell-msg {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
  min-height: 28px;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #171d17;
}

.err-span {
  color: #d93025;
  font-weight: 800;
  background: rgba(217, 48, 37, 0.12);
  border-bottom: 2px wavy #d93025;
  padding: 1px 2px;
  border-radius: 2px;
}

/* Note triangle in top-right corner of cell */
.cell-note-triangle {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-top: 8px solid #d93025;
}

.cell-note-triangle.ok-note {
  border-top-color: #3c4043;
}

/* ================= NÚT LỌC & RESET KHỔNG LỒ ================= */
.big-action-cell {
  background: #eff4ef !important;
  padding: 10px !important;
  vertical-align: middle !important;
  text-align: center !important;
}

.huge-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 100px;
  border-radius: 10px;
  cursor: pointer;
  border: 2.5px solid;
  padding: 12px 10px;
  font-family: "Roboto", sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.16s ease-in-out;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.huge-action-btn:active {
  transform: scale(0.97);
}

.huge-action-btn.btn-filter {
  background: #ffffff;
  color: #11518e;
  border-color: #11518e;
}

.huge-action-btn.btn-filter:hover {
  background: #11518e;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(17, 81, 142, 0.35);
}

.huge-action-btn.btn-reset {
  background: #ffffff;
  color: #b70f14;
  border-color: #b70f14;
}

.huge-action-btn.btn-reset:hover {
  background: #b70f14;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(183, 15, 20, 0.35);
}

.huge-btn-icon {
  font-size: 32px;
  line-height: 1;
}

.huge-btn-sub {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.85;
}

.cell-checkbox-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}

.gs-checkbox {
  width: 22px;
  height: 22px;
  cursor: pointer;
  accent-color: #11518e;
}

.num-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}

.center-cell {
  text-align: center;
}

.bold-cell {
  font-weight: 700;
}

.warn-text {
  color: #d93025 !important;
  font-weight: 700;
}

.ok-text {
  color: #188038 !important;
  font-weight: 700;
}

/* Các màu chuẩn trích xuất từ Google Sheet */
.gs-header-green {
  background: #2c6a44 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 15px !important;
}

.gs-header-blue {
  background: #535fc1 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 15px !important;
}

.gs-bg-mint {
  background: #dbede0 !important;
}

.gs-bg-zebra {
  background: #f4f8f2 !important;
}

.gs-bg-divider {
  background: #d1e5ff !important;
  border-left: 2px solid #a8c7fa !important;
  border-right: 2px solid #a8c7fa !important;
}

.gs-bg-yellow {
  background: #fff8db !important;
}

.bg-soft-green {
  background: #dbede0 !important;
}

.bg-soft-blue {
  background: #e8f0fe !important;
}

.bg-soft-yellow {
  background: #fff8db !important;
}

.bg-soft-gray {
  background: #eff4ef !important;
}

/* BOTTOM TAB BAR (9 TABS) */
.gs-bottom-tabs {
  display: flex;
  align-items: center;
  background: #f1f3f4;
  border-top: 1px solid var(--gs-border);
  height: 38px;
  padding: 0 12px;
  gap: 2px;
  overflow-x: auto;
}

.gs-tab-btn {
  padding: 7px 16px;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: #444746;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gs-tab-btn:hover {
  background: #e3e6e8;
}

.gs-tab-btn.active {
  background: #fff;
  color: var(--gs-green);
  font-weight: 700;
  border-color: var(--gs-border);
  box-shadow: 0 -2px 0 var(--gs-green) inset;
}

.tab-badge {
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 10px;
  background: #e8f0fe;
  color: var(--gs-blue);
  font-weight: 600;
}

.tab-badge.err {
  background: var(--gs-red-bg);
  color: var(--gs-red);
}

/* MODALS */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 10px;
  width: 820px;
  max-width: 96vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gs-border);
  background: #f8f9fa;
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
  color: #202124;
}

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--gs-border);
  background: #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table th, .data-table td {
  border: 1px solid var(--gs-border);
  padding: 7px 9px;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  background: #f1f3f4;
  font-weight: 600;
}

/* Inline cell editor textarea */
.cell-editor-textarea {
  width: 100%;
  min-height: 110px;
  border: 2px solid var(--gs-blue);
  border-radius: 4px;
  padding: 6px;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  resize: vertical;
  outline: none;
}

/* Toast notification */
.toast-container {
  position: fixed;
  bottom: 48px;
  right: 18px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #202124;
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 12.5px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  max-width: 380px;
}

.toast.error {
  background: var(--gs-red);
}

.toast.success {
  background: var(--gs-green);
}

/* ==========================================================================
   GIAO DIỆN CHUYÊN BIỆT CHO ĐIỆN THOẠI (MOBILE RESPONSIVE: <= 768px)
   TUYỆT ĐỐI KHÔNG ẢNH HƯỞNG ĐẾN MÁY TÍNH (> 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* 1. Màn hình đăng nhập */
  .login-card {
    width: 100%;
    margin: 12px;
    padding: 22px 18px;
  }
  
  .login-title {
    font-size: 17px;
  }

  /* 2. Top bar trên mobile */
  .gs-topbar {
    padding: 6px 8px;
    gap: 6px;
    flex-wrap: wrap;
  }

  .gs-topbar-left {
    gap: 6px;
    width: 100%;
    justify-content: space-between;
  }

  .gs-sheet-select {
    font-size: 14px;
    max-width: 160px;
    padding: 5px 6px;
  }

  #headerStatusBadge {
    display: block;
    width: 100%;
    font-size: 11px;
    margin: 2px 0 0 0;
  }

  /* 3. Menu bar trên mobile - Vuốt ngang mượt mà, nút to dễ bấm */
  .gs-menu-bar {
    padding: 6px 8px;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .gs-menu-bar::-webkit-scrollbar {
    display: none;
  }

  .gs-menu-bar .btn {
    padding: 6px 11px;
    font-size: 12.5px;
    height: 32px;
    flex-shrink: 0;
  }

  /* Ẩn bớt text gợi ý dài trên màn hình mobile */
  .gs-menu-bar > span:last-child {
    display: none;
  }

  /* 4. Formula bar trên mobile */
  .gs-formula-bar {
    height: 32px;
    padding: 0 6px;
  }

  .gs-formula-input {
    font-size: 13.5px;
  }

  /* 5. Vùng lưới bảng tính & cuộn cảm ứng */
  .gs-viewport {
    -webkit-overflow-scrolling: touch;
  }

  /* Sticky cột A (Số) trên mobile khi xem bảng Lô, Đề, Xiên */
  table.gs-grid.sticky-col-a th.sticky-col,
  table.gs-grid.sticky-col-a td.sticky-col {
    position: sticky !important;
    left: 44px !important; /* Ngay sau cột row-num rộng 44px */
    z-index: 15 !important;
    background: #ffffff !important;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.08);
  }

  table.gs-grid.sticky-col-a thead tr.row-1-frozen th.sticky-col {
    z-index: 35 !important;
    background: #2c6a44 !important;
  }

  table.gs-grid.sticky-col-a thead tr.col-letters th.sticky-col {
    z-index: 38 !important;
    background: #f1f3f4 !important;
  }

  /* 6. Thanh chọn nhanh khách hàng trên mobile (Mobile Customer Chips) */
  .mobile-cust-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: #f1f3f4;
    border-bottom: 1px solid #c5cfc9;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: none;
  }

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

  .cust-chip {
    padding: 5px 12px;
    border-radius: 16px;
    border: 1px solid #a5b2aa;
    background: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
    color: #171d17;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
  }

  .cust-chip.active {
    background: #2c6a44;
    color: #ffffff;
    border-color: #2c6a44;
  }

  /* 7. Bottom Tabs trên mobile - Ghim chắc, to rõ ngón tay bấm tiện */
  .gs-bottom-tabs {
    height: 46px;
    padding: 0 6px;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .gs-tab-btn {
    padding: 9px 13px;
    font-size: 13.5px;
    flex-shrink: 0;
  }

  /* 8. Textarea sửa tin nhắn trên điện thoại */
  .cell-editor-textarea {
    min-height: 140px;
    font-size: 15px;
    padding: 8px;
  }

  /* 9. Modal trên điện thoại */
  .modal-box {
    width: 96vw !important;
    max-height: 94vh !important;
  }

  .modal-header {
    padding: 10px 14px;
  }

  .modal-header h3 {
    font-size: 15px;
  }

  .modal-body {
    padding: 12px 14px;
  }

  .modal-body div[style*="grid-template-columns"] {
    grid-template-columns: 1fr 1fr !important;
  }

  .modal-footer {
    padding: 10px 14px;
  }
}

@media (max-width: 480px) {
  .modal-body div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

/* AUTH TABS (Đăng nhập / Đăng ký) */
.auth-tabs {
  display: flex;
  border-bottom: 2px solid #e8eaed;
  margin-bottom: 18px;
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  padding: 10px 8px;
  background: none;
  border: none;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  color: #5f6368;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
  text-align: center;
}

.auth-tab-btn:hover {
  color: var(--gs-text);
}

.auth-tab-btn.active {
  color: var(--gs-green);
  border-bottom-color: var(--gs-green);
}

/* ADMIN SUB-TABS */
.admin-tab-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid #dadce0;
  padding-bottom: 8px;
}

.admin-tab-btn {
  padding: 8px 16px;
  border: 1px solid #dadce0;
  border-radius: 6px;
  background: #f8f9fa;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: #3c4043;
  transition: all 0.15s ease;
}

.admin-tab-btn:hover {
  background: #edf2fa;
  color: #1a73e8;
}

.admin-tab-btn.active {
  background: #1a73e8;
  color: #fff;
  border-color: #1a73e8;
}

/* EXPIRATION BADGES */
.badge-exp-green {
  background: #e6f4ea;
  color: #137333;
  border: 1px solid #ceead6;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-exp-warn {
  background: #fef7e0;
  color: #b06000;
  border: 1px solid #feefc3;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-exp-danger {
  background: #fce8e6;
  color: #c5221f;
  border: 1px solid #fad2cf;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-exp-perm {
  background: #e8f0fe;
  color: #174ea6;
  border: 1px solid #d2e3fc;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* CODE PILL WITH COPY */
.code-pill {
  font-family: Consolas, monospace;
  font-size: 12.5px;
  font-weight: 700;
  background: #f1f3f4;
  color: #1a73e8;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #dadce0;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-copy {
  padding: 2px 6px;
  font-size: 11px;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 4px;
  cursor: pointer;
  color: #3c4043;
}

.btn-copy:hover {
  background: #e8f0fe;
  color: #1a73e8;
  border-color: #aecbfa;
}

/* NÚT THU GỌN / MỞ RỘNG MENU (CHẾ ĐỘ TOÀN MÀN HÌNH BẢNG TÍNH) */
.btn-toggle-header {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #f1f3f4;
  border: 1px solid var(--gs-border);
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #3c4043;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
  margin-left: 6px;
  user-select: none;
}

.btn-toggle-header:hover {
  background: #e8f0fe;
  color: #1a73e8;
  border-color: #aecbfa;
}

.btn-toggle-header.is-collapsed {
  background: #188038;
  color: #ffffff;
  border-color: #188038;
  box-shadow: 0 1px 3px rgba(24, 128, 56, 0.3);
}

.btn-toggle-header.is-collapsed:hover {
  background: #137333;
}

/* TRẠNG THÁI THU GỌN HEADER (FULL SCREEN TOÀN DIỆN CHO MOBILE & DESKTOP) */
.app-container.header-collapsed .gs-topbar,
.app-container.header-collapsed .gs-menu-bar {
  display: none !important;
}

.app-container.header-collapsed .gs-formula-bar {
  border-top: none;
  background: #f1f8f3;
}


