:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary: #4b5563;
  --secondary-hover: #374151;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --pdf-color: #dc2626;
  --excel-color: #16a34a;
  --ios-color: #0284c7;
  --bg-dark: #0f172a;
  --bg-light: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --accent-orange: #ea580c;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  background-color: #f1f5f9;
  height: 100vh;
  overflow: hidden;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* TOP NAVBAR */
.top-nav {
  height: 58px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  z-index: 10;
}

.top-nav .app-logo {
  display: none !important; /* Đã chuyển xuống hiển thị nhỏ dưới dòng ngôn ngữ theo yêu cầu */
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 700;
  font-size: 15px;
}

.project-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
  border: 1px solid var(--border-color);
}

.project-summary:hover {
  background: #e2e8f0;
}

.proj-name {
  font-weight: 600;
  color: var(--text-main);
}

.proj-sep {
  color: #94a3b8;
}

.proj-sec, .proj-file {
  color: var(--text-muted);
}

.edit-icon {
  font-size: 12px;
  margin-left: 4px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ACTIVE DRAWING CAPSULE (ĐẦY ĐỦ THÔNG TIN BẢN VẼ / DỰ ÁN ĐANG MỞ) */
.nav-active-drawing-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  max-width: 340px;
  flex-shrink: 1;
  min-width: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.nav-active-drawing-pill:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15);
}

.nadp-folder {
  font-weight: 600;
  color: #334155;
  font-size: 12.5px;
  white-space: nowrap;
}

.nadp-divider {
  color: #94a3b8;
  font-weight: 400;
  font-size: 12px;
}

.nadp-drawing {
  font-weight: 700;
  color: #1d4ed8;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.nadp-badge {
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 10px;
  white-space: nowrap;
}

.nadp-defect-badge {
  background: #fee2e2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 700;
  padding: 1.5px 7px;
  border-radius: 10px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.nadp-arrow {
  font-size: 10px;
  color: #64748b;
  margin-left: 2px;
}

@media (max-width: 1200px) {
  .nadp-drawing {
    max-width: 140px;
  }
}

@media (max-width: 1024px) {
  .nadp-folder {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nadp-drawing {
    max-width: 100px;
  }
}

@media (max-width: 899px) {
  .nav-active-drawing-pill {
    display: none !important;
  }
}

/* TOP NAV ACTIONS & TOOLS DROPDOWN */
.btn-undo-top {
  border-color: #cbd5e1;
  font-weight: 600;
}

.btn-undo-top:not(:disabled):hover {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #b45309;
}

.btn-toggle-tools {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-toggle-tools:hover,
.btn-toggle-tools.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.btn-toggle-tools .tools-arrow {
  font-size: 10px;
  color: #64748b;
  margin-left: 2px;
}

/* TOOLS DROPDOWN WRAPPER & MENU */
.tools-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.tools-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 290px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  padding: 6px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tools-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  color: #1e293b;
}

.tools-menu-item:hover {
  background: #f1f5f9;
}

.tools-menu-item .menu-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.tools-menu-item .menu-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tools-menu-item .menu-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

.tools-menu-item .menu-sub {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
  margin-top: 1px;
}

.mobile-sidebar-close-btn {
  display: none;
  background: none;
  border: none;
  font-size: 18px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
}

.mobile-sidebar-close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

.btn-ios {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
}

.btn-ios:hover {
  background: #0284c7;
}

.btn-danger {
  background-color: #fee2e2;
  color: var(--danger);
  border-color: #fca5a5;
}

.btn-danger:hover {
  background-color: #fecaca;
}

.btn-pdf {
  background-color: #ef4444;
  color: #ffffff;
}

.btn-pdf:hover {
  background-color: #dc2626;
}

.btn-excel {
  background-color: #10b981;
  color: #ffffff;
}

.btn-excel:hover {
  background-color: #059669;
}

.file-upload-label {
  cursor: pointer;
}

/* MAIN CONTENT SPLIT */
.main-content {
  display: flex;
  flex: 1;
  height: calc(100vh - 54px);
  height: calc(100dvh - 54px);
  overflow: hidden;
}

/* LEFT PANEL: BLUEPRINT CANVAS */
.left-panel {
  flex: 1.35;
  display: flex;
  flex-direction: column;
  background: #cbd5e1;
  border-right: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.canvas-toolbar {
  height: 48px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 5;
}

.mode-toggles {
  display: flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 6px;
  gap: 2px;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 4px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.tool-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.zoom-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-main);
  transition: background 0.2s;
}

.icon-btn:hover {
  background: #f8fafc;
}

.zoom-label {
  font-size: 12px;
  font-weight: 500;
  width: 44px;
  text-align: center;
  color: var(--text-muted);
}

.blueprint-info {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-replace-floorplan {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  transition: all 0.15s ease;
  white-space: nowrap;
  user-select: none;
}

.btn-replace-floorplan:hover {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #b45309;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.2);
}

.btn-saf-replace {
  border: none;
  background: transparent;
  color: #2563eb;
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
  padding: 1px 4px;
  border-radius: 4px;
  transition: background 0.15s;
}

.btn-saf-replace:hover {
  background: #eff6ff;
  text-decoration: underline;
}

.btn-replace-plan-mini {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.15s;
}

.btn-replace-plan-mini:hover {
  background: #fde68a;
  border-color: #f59e0b;
}

.canvas-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: grab;
  background: #94a3b8;
  touch-action: none;
}

.canvas-viewport.grabbing {
  cursor: grabbing;
}

.canvas-viewport.pin-mode {
  cursor: crosshair;
}

#blueprintCanvas {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
}

.canvas-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(4px);
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  pointer-events: none;
}

.legend-badge {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-orange);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px var(--accent-orange);
}

.legend-line {
  width: 16px;
  height: 2px;
  background: var(--accent-orange);
  position: relative;
}

.legend-line::after {
  content: '';
  position: absolute;
  right: -2px;
  top: -2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-orange);
}

/* RIGHT PANEL: DEFECT TABLE */
.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  overflow: hidden;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), flex 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.right-panel.collapsed {
  display: none !important;
  width: 0 !important;
  flex: 0 !important;
}

.btn-collapse-right {
  background: none;
  border: none;
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-collapse-right:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.btn-toggle-table,
.btn-fullscreen-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
}

.panel-toggle-badge {
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
}

.panel-toggle-arrow {
  font-size: 10px;
  color: #64748b;
}

/* FLOATING EDGE TOGGLE TABS (FOR EASY EXPANDING WHEN COLLAPSED) */
.floating-edge-toggle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: none;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  font-weight: 600;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.floating-edge-toggle:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.floating-edge-toggle.left {
  left: 12px;
}

.floating-edge-toggle.right {
  right: 12px;
}

.floating-edge-toggle .panel-toggle-badge {
  background: #eff6ff;
  color: #1d4ed8;
}

.floating-edge-toggle:hover .panel-toggle-badge {
  background: #ffffff;
  color: #2563eb;
}

.table-header-bar {
  min-height: 48px;
  height: auto;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  gap: 8px;
  flex-wrap: wrap;
}

.table-title-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-title-area h3 {
  font-size: 14px;
  font-weight: 600;
}

.counter-badge {
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.table-filters {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
}

.search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrap svg {
  position: absolute;
  left: 10px;
  color: #94a3b8;
}

.search-input-wrap input {
  width: 100%;
  padding: 6px 10px 6px 30px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 12px;
  outline: none;
}

.search-input-wrap input:focus {
  border-color: var(--primary);
}

.table-filters select {
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 12px;
  background: #ffffff;
  outline: none;
}

.table-container {
  flex: 1;
  overflow-y: auto;
}

.defect-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.defect-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 2;
}

.defect-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.defect-table tr:hover {
  background: #f8fafc;
  cursor: pointer;
}

.defect-table tr.active-row {
  background: #eff6ff;
}

.no-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-orange);
  color: #ffffff;
  font-weight: 700;
  font-size: 11px;
}

.tag-part {
  background: #f1f5f9;
  color: #475569;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.photo-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #0284c7;
  font-weight: 600;
  font-size: 11px;
}

.actions-cell {
  display: flex;
  gap: 4px;
}

.action-btn {
  border: none;
  background: transparent;
  padding: 4px;
  cursor: pointer;
  border-radius: 4px;
  color: var(--text-muted);
}

.action-btn:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

/* MOBILE BOTTOM NAV */
.mobile-bottom-nav {
  display: none;
  height: 56px;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  justify-content: space-around;
  align-items: center;
}

.nav-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 12px;
}

.nav-tab-btn.active {
  color: var(--primary);
  font-weight: 600;
}

/* MODALS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  box-sizing: border-box;
  padding: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.modal-box {
  background: #ffffff;
  border-radius: 12px;
  width: 90%;
  max-width: 580px;
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  animation: modalFadeIn 0.2s ease-out;
  overflow: hidden !important;
  box-sizing: border-box;
}

.modal-lg {
  max-width: 780px;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  flex-shrink: 0 !important;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.modal-header h4 {
  font-size: 16px;
  font-weight: 600;
}

.close-btn {
  border: none;
  background: transparent;
  font-size: 20px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover {
  color: var(--text-main);
}

.modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 16px 20px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #f1f5f9;
}

/* Explicit custom scrollbars for all scrollable panels across the entire system */
.modal-body::-webkit-scrollbar,
.modal-overlay::-webkit-scrollbar,
.table-container::-webkit-scrollbar,
.c2-picker-tree-list::-webkit-scrollbar,
.c2-sheet-content::-webkit-scrollbar,
.explorer-split-layout::-webkit-scrollbar,
.explorer-folder-tree::-webkit-scrollbar,
.explorer-content::-webkit-scrollbar,
.mobile-defect-cards::-webkit-scrollbar,
.transfer-list-body::-webkit-scrollbar {
  width: 6px;
  height: 6px;
  display: block !important;
}
.modal-body::-webkit-scrollbar-track,
.modal-overlay::-webkit-scrollbar-track,
.c2-picker-tree-list::-webkit-scrollbar-track,
.c2-sheet-content::-webkit-scrollbar-track,
.explorer-folder-tree::-webkit-scrollbar-track,
.explorer-content::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.modal-body::-webkit-scrollbar-thumb,
.modal-overlay::-webkit-scrollbar-thumb,
.table-container::-webkit-scrollbar-thumb,
.c2-picker-tree-list::-webkit-scrollbar-thumb,
.c2-sheet-content::-webkit-scrollbar-thumb,
.explorer-folder-tree::-webkit-scrollbar-thumb,
.explorer-content::-webkit-scrollbar-thumb,
.transfer-list-body::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}
.modal-body::-webkit-scrollbar-thumb:hover,
.c2-picker-tree-list::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

.modal-footer {
  flex-shrink: 0 !important;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  background: #ffffff;
  position: sticky;
  bottom: 0;
  z-index: 10;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

.form-group {
  margin-bottom: 12px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.col-2 { flex: 2; }
.col-3 { flex: 3; }
.col-4 { flex: 4; }
.col-6 { flex: 6; }

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.form-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--primary);
}

textarea.form-input {
  resize: vertical;
}

/* PHOTO SECTION */
.photo-section {
  background: #f8fafc;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.photo-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.clipboard-tip {
  font-size: 11px;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 6px;
  border-radius: 4px;
}

.photo-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  width: 100%;
  box-sizing: border-box;
}

.photo-actions-bar label.btn,
.photo-actions-bar .btn {
  flex: 1 1 calc(50% - 6px);
  min-width: 130px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: normal !important;
  text-align: center;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 12.5px;
  line-height: 1.25;
}

.camera-btn {
  background: #0284c7;
}

.camera-btn:hover {
  background: #0369a1;
}

.drop-zone {
  border: 2px dashed #cbd5e1;
  background: #ffffff;
  border-radius: 6px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--primary);
  background: #eff6ff;
}

.drop-zone p {
  font-size: 12px;
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.photo-thumb-card {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #000;
}

.photo-thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-thumb-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
}

.photo-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(220, 38, 38, 0.85);
  color: #fff;
  border: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
}

.photo-delete-btn:hover {
  background: var(--danger);
}



/* IOS QR MODAL STYLES */
.ios-modal-content {
  text-align: center;
}

.qr-container {
  background: #ffffff;
  padding: 12px;
  border-radius: 12px;
  display: inline-block;
  margin: 6px auto 12px auto;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.qr-image {
  width: 180px;
  height: 180px;
  display: block;
}

.ios-url-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.ios-url-box span {
  display: block;
  font-size: 12px;
  color: #1e40af;
  margin-bottom: 4px;
}

.ios-link {
  font-size: 16px;
  font-weight: 700;
  color: #1d4ed8;
  text-decoration: none;
}

.ios-steps {
  text-align: left;
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.ios-steps h5 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.ios-steps ol {
  padding-left: 20px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.ios-steps li {
  margin-bottom: 6px;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 200;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* PROJECT MANAGER & FOLDER STYLES */
.proj-folder-tag {
  background: #e2e8f0;
  color: #1e293b;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.modal-xl {
  max-width: 920px;
}

.modal-title-with-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
}

.modal-title-with-icon h4 {
  color: var(--text-main);
  margin: 0;
}

.pm-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pm-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pm-search-box {
  flex: 1;
  min-width: 220px;
}

.pm-search-box input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.pm-search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.pm-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pm-folder-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
  border-bottom: 1px solid #e2e8f0;
}

.folder-bar-title {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.pm-folder-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.pm-folder-tab {
  padding: 4px 12px;
  border-radius: 16px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.pm-folder-tab:hover {
  background: #e2e8f0;
}

.pm-folder-tab.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.pm-project-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 4px;
}

.pm-project-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  transition: all 0.15s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.pm-project-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.pm-project-card.active {
  border-color: var(--primary);
  background: #f8faff;
  box-shadow: 0 0 0 1px var(--primary);
}

.pm-card-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pm-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pm-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.pm-active-badge {
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}

/* ============================================================
   EXPLORER LIST & TWO-COLUMN FOLDER MANAGEMENT
   ============================================================ */
.explorer-modal-box {
  max-width: 1100px !important;
  width: 95vw !important;
  max-height: calc(100vh - 28px) !important;
  max-height: calc(100dvh - 28px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.explorer-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.explorer-header-role-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 12px;
}

.badge-role-tag {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 14px;
}

.badge-role-tag.admin {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.badge-role-tag.contractor {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.explorer-contractor-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fffbeb;
  border: 1.5px solid #fcd34d;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12.5px;
  color: #92400e;
}

.ecb-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ecb-icon {
  font-size: 18px;
}

.explorer-split-layout {
  display: flex;
  gap: 14px;
  flex: 1;
  min-height: 440px;
  max-height: 60vh;
  overflow: hidden;
}

.explorer-sidebar {
  width: 220px;
  min-width: 200px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

.sidebar-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.5px;
}

.explorer-folder-tree {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.explorer-folder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  color: #334155;
  transition: all 0.15s ease;
  user-select: none;
}

.explorer-folder-item:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.explorer-folder-item.active {
  background: #2563eb;
  color: #ffffff;
  font-weight: 600;
}

.explorer-folder-item.active .folder-count-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.folder-count-badge {
  font-size: 11px;
  background: #e2e8f0;
  color: #475569;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}

/* Tree Children Sub-list in Sidebar */
.explorer-tree-children {
  display: flex;
  flex-direction: column;
  padding-left: 10px;
  margin-top: 1px;
  margin-bottom: 4px;
  border-left: 2px solid #cbd5e1;
  margin-left: 14px;
  gap: 2px;
}

.explorer-tree-file {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 11.5px;
  color: #334155;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}

.explorer-tree-file:hover {
  background: #e2e8f0;
  color: #0284c7;
}

.explorer-tree-file.active {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 600;
}

.etf-branch {
  color: #94a3b8;
  font-family: monospace;
  font-size: 11px;
  user-select: none;
}

.etf-icon {
  font-size: 12px;
  flex-shrink: 0;
}

.etf-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.etf-badge {
  font-size: 10px;
  background: #f1f5f9;
  color: #64748b;
  border-radius: 8px;
  padding: 1px 5px;
  font-weight: 600;
  flex-shrink: 0;
}

.explorer-tree-empty {
  font-size: 11px;
  color: #94a3b8;
  font-style: italic;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-tree-toggle {
  background: none;
  border: none;
  color: #64748b;
  font-size: 10px;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  border-radius: 3px;
  margin-right: 2px;
}

.btn-tree-toggle:hover {
  background: rgba(0,0,0,0.06);
  color: #0f172a;
}

.explorer-folder-item.active .btn-tree-toggle {
  color: rgba(255, 255, 255, 0.9);
}

/* Folder Directory Grid in Main Pane */
.folder-dir-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 2px;
}

.folder-dir-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1.5px solid #e2e8f0;
}

.fdh-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.folder-dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.folder-dir-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.folder-dir-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 6px 16px rgba(37,99,235,0.12);
  transform: translateY(-2px);
}

.fdc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fdc-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fdc-icon {
  font-size: 28px;
  line-height: 1;
}

.fdc-name {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}

.fdc-meta {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 1px;
}

.fdc-count-pill {
  font-size: 11.5px;
  font-weight: 600;
  background: #eff6ff;
  color: #2563eb;
  padding: 3px 9px;
  border-radius: 12px;
  border: 1px solid #bfdbfe;
}

.fdc-preview-list {
  background: #f8fafc;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #475569;
  border: 1px solid #f1f5f9;
}

.fdc-preview-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fdc-preview-empty {
  color: #94a3b8;
  font-style: italic;
  font-size: 11.5px;
}

.fdc-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.fdc-open-btn {
  font-weight: 600;
  font-size: 12px;
  padding: 4px 10px;
}

.eb-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.eb-back-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

.explorer-content-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.explorer-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px;
}

.explorer-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.eb-label {
  color: #64748b;
}

.eb-folder-tag {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #bfdbfe;
}

.eb-count {
  font-size: 12px;
  color: #64748b;
}

.explorer-view-toggle {
  display: flex;
  gap: 4px;
}

.btn-toggle-view {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
}

.btn-toggle-view.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.explorer-dropzone {
  border: 2px dashed #93c5fd;
  background: #f0f7ff;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.explorer-dropzone:hover {
  border-color: #2563eb;
  background: #e0f2fe;
}

.edz-icon {
  font-size: 24px;
}

.edz-text {
  font-size: 12.5px;
  color: #1e3a8a;
  flex: 1;
}

.edz-text span {
  text-decoration: underline;
  font-weight: 600;
}

.edz-sub {
  font-size: 11px;
  color: #64748b;
}

.explorer-upload-progress {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 8px 12px;
}

.eup-text {
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
  margin-bottom: 4px;
}

.eup-bar {
  height: 6px;
  background: #cbd5e1;
  border-radius: 3px;
  overflow: hidden;
}

.eup-bar-fill {
  height: 100%;
  width: 0%;
  background: #2563eb;
  transition: width 0.3s ease;
}

.explorer-items-container {
  flex: 1;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

/* Explorer Table View */
.explorer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.explorer-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1.5px solid #cbd5e1;
  z-index: 10;
  white-space: nowrap;
}

.explorer-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.efi-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.efi-icon {
  font-size: 15px;
  flex-shrink: 0;
}

.efi-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.efi-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.efi-count {
  font-size: 11px;
  background: #e2e8f0;
  color: #475569;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 600;
}

.explorer-folder-item.active .efi-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.btn-del-folder {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 4px;
}

.btn-del-folder:hover {
  background: #fee2e2;
  color: #ef4444;
}

.explorer-folder-item.active .btn-del-folder {
  color: rgba(255, 255, 255, 0.7);
}

.explorer-folder-item.active .btn-del-folder:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.btn-rename-folder {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 4px;
  margin-right: 2px;
}

.btn-rename-folder:hover {
  background: #e0f2fe;
  color: #0284c7;
}

.explorer-folder-item.active .btn-rename-folder {
  color: rgba(255, 255, 255, 0.8);
}

.explorer-folder-item.active .btn-rename-folder:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.explorer-folder-item.drag-target-hover {
  background: #dbeafe !important;
  border: 2px dashed #2563eb !important;
  transform: scale(1.02);
}

.badge-folder-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.badge-folder-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
}


.explorer-table tr.explorer-row,
.explorer-table tr.explorer-tr {
  cursor: pointer;
  transition: background 0.15s ease;
}

.explorer-table tr.explorer-row:hover,
.explorer-table tr.explorer-tr:hover {
  background: #f0f7ff;
}

.explorer-table tr.explorer-row.active,
.explorer-table tr.explorer-tr.active-row {
  background: #eff6ff;
  border-left: 3px solid #2563eb;
}

.explorer-file-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ef-icon, .efc-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.ef-info, .efc-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ef-name, .efc-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ef-meta, .efc-meta {
  font-size: 12px;
  color: #334155;
  line-height: 1.35;
}

.efc-sub {
  font-size: 11px;
  color: #64748b;
  font-family: monospace;
}

.efc-date {
  font-size: 11.5px;
  color: #64748b;
}

.efc-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  align-items: center;
}

.badge-folder-tag {
  display: inline-block;
  font-size: 11.5px;
  background: #f1f5f9;
  color: #334155;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
  border: 1px solid #e2e8f0;
}

.badge-file-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-file-missing {
  display: inline-block;
  font-size: 11px;
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 2px 6px;
  border-radius: 4px;
}

.badge-comment-count {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 2px 8px;
  border-radius: 12px;
}

.active-pill-tag {
  background: #16a34a;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.explorer-empty-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
  color: #64748b;
}

.eep-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.eep-icon + h4 {
  font-size: 15px;
  color: #1e293b;
  margin: 0 0 6px 0;
}

.eep-icon + h4 + p {
  font-size: 13px;
  margin: 0;
  color: #64748b;
}

.explorer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ef-tip {
  font-size: 12px;
  color: #475569;
}

@media (max-width: 768px) {
  .explorer-split-layout {
    flex-direction: column;
    max-height: 70vh;
  }
  .explorer-sidebar {
    width: 100%;
    min-width: 100%;
    max-height: 120px;
  }
  .explorer-folder-tree {
    flex-direction: row;
    overflow-x: auto;
  }
  .explorer-table th:nth-child(3),
  .explorer-table td:nth-child(3),
  .explorer-table th:nth-child(5),
  .explorer-table td:nth-child(5) {
    display: none;
  }
}

.pm-card-details {
  font-size: 12px;
  color: #64748b;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pm-card-stats {
  font-size: 11px;
  display: flex;
  gap: 8px;
  align-items: center;
  color: #64748b;
}

.stat-tag {
  padding: 2px 6px;
  background: #f1f5f9;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-weight: 500;
}

.stat-tag.has-plan {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.pm-card-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.pm-empty-list {
  text-align: center;
  padding: 30px 20px;
  color: #64748b;
}

.btn-icon-danger:hover {
  background: #fee2e2 !important;
  color: #dc2626 !important;
}

/* RESPONSIVE DESIGN FOR IOS MOBILE & TABLET */
@media (max-width: 899px) {
  .hide-mobile {
    display: none !important;
  }

  .main-content {
    height: calc(100vh - 58px - 56px);
  }

  .left-panel, .right-panel {
    flex: 1;
    width: 100%;
  }

  .left-panel {
    display: flex;
  }

  .right-panel {
    display: none;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .form-row {
    flex-direction: column;
    gap: 8px;
  }

  .modal-overlay {
    padding: 8px !important;
    align-items: center !important;
    justify-content: center !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .modal-box {
    width: calc(100vw - 16px) !important;
    max-width: 540px !important;
    max-height: calc(100vh - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }

  .modal-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 #f1f5f9;
  }
}

/* =============================================================
   OFFLINE & LOCAL SYNC STYLES (iOS PWA & PC)
   ============================================================= */

/* Sync status pill in Top Navbar */
.sync-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.sync-status-pill:hover {
  background: #e2e8f0;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.sync-dot.online {
  background-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.sync-dot.offline {
  background-color: #f97316;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.25);
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.sync-label {
  color: var(--text-main);
  white-space: nowrap;
}

.sync-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
}

/* Quick Refresh Icon & Button Styles */
.btn-quick-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 20px;
  padding: 5px 12px;
  transition: all 0.2s ease;
  background: #ffffff;
  border: 1px solid var(--border-color, #cbd5e1);
  color: #1e293b;
  font-size: 12px;
}

.btn-quick-refresh:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-quick-refresh:active {
  transform: scale(0.96);
}

.refresh-icon,
.c2-refresh-icon {
  display: inline-block;
  font-size: 14px;
  line-height: 1;
  transition: transform 0.4s ease;
}

.btn-quick-refresh.refreshing .refresh-icon,
.c2-refresh-btn.refreshing .c2-refresh-icon,
.btn-picker-refresh.refreshing .c2-refresh-icon {
  animation: spinRefreshAnim 0.75s linear infinite;
}

@keyframes spinRefreshAnim {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.c2-refresh-btn {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  padding: 0 7px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all 0.15s ease;
}

.c2-refresh-btn:active {
  background: #e2e8f0;
  transform: scale(0.92);
}

.btn-picker-refresh {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  color: #334155;
  transition: all 0.15s ease;
}

.btn-picker-refresh:hover {
  background: #e2e8f0;
}

.btn-picker-refresh:active {
  transform: scale(0.92);
}

/* Offline Ribbon Banner */
.offline-ribbon {
  background: linear-gradient(90deg, #ea580c, #c2410c);
  color: #ffffff;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 9;
}

.ribbon-text {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ribbon-badge {
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
}

.ribbon-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ribbon-actions .btn {
  background: #ffffff;
  color: #c2410c;
  font-weight: 600;
  border: none;
}

.ribbon-actions .btn:hover {
  background: #fff7ed;
}

/* Mobile Bottom Nav Sync Badge */
.nav-tab-btn {
  position: relative;
}

.mobile-tab-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 18px);
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  min-width: 14px;
  text-align: center;
}

/* Camera Button Highlight */
.camera-btn {
  background: #0284c7 !important;
  color: #ffffff !important;
}

.camera-btn:hover {
  background: #0369a1 !important;
}

/* Sync Button Highlight Pulse */
.btn-sync-highlight {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.45);
  animation: pulse-sync-btn 2s infinite;
}

@keyframes pulse-sync-btn {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

/* iOS Steps Styling in Modal */
.ios-steps {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 14px;
}

.ios-steps h5 {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 10px;
}

.ios-steps ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
}

.ios-steps li b {
  color: #0f172a;
}

/* =============================================================
   EXPORT MODAL & IMAGE COMPRESSION STYLES
   ============================================================= */

.export-modal-box {
  max-width: 780px !important;
  width: 95% !important;
  max-height: calc(100vh - 28px) !important;
  max-height: calc(100dvh - 28px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.export-section {
  margin-bottom: 20px;
}

.export-section:last-child {
  margin-bottom: 8px;
}

.export-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.est-num {
  background: #2563eb;
  color: #ffffff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.est-text {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.3px;
}

.export-mode-grid,
.export-format-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .export-mode-grid,
  .export-format-grid {
    grid-template-columns: 1fr;
  }
}

.export-mode-card,
.export-format-card {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #ffffff;
  transition: all 0.2s ease;
  user-select: none;
  position: relative;
}

.export-mode-card:hover,
.export-format-card:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}

.export-mode-card.selected,
.export-format-card.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1.5px #2563eb;
}

.export-mode-card input[type="radio"],
.export-format-card input[type="radio"] {
  display: none;
}

.emc-icon,
.efmt-icon {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.emc-body,
.efmt-body {
  flex: 1;
  min-width: 0;
}

.emc-head,
.efmt-head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.emc-title,
.efmt-title {
  font-weight: 700;
  font-size: 13.5px;
  color: #0f172a;
}

.emc-badge,
.efmt-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1.5px 7px;
  border-radius: 12px;
}

.emc-desc,
.efmt-desc {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.45;
  margin: 0;
}

.compression-options-grid-compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 640px) {
  .compression-options-grid-compact {
    grid-template-columns: 1fr;
  }
}

.badge-red {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.export-subtitle {
  font-size: 13.5px;
  color: #4b5563;
  margin-bottom: 16px;
  line-height: 1.5;
}

.compression-options-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.comp-card {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #ffffff;
  transition: all 0.2s ease;
  user-select: none;
}

.comp-card:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}

.comp-card.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #2563eb;
}

.comp-card input[type="radio"] {
  margin-top: 3px;
  cursor: pointer;
  accent-color: #2563eb;
  width: 16px;
  height: 16px;
}

.comp-card-content {
  flex: 1;
}

.comp-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.comp-icon {
  font-size: 15px;
}

.comp-title {
  font-weight: 600;
  font-size: 14px;
  color: #1e293b;
}

.comp-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.badge-green {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-blue {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-purple {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.badge-gray {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.comp-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.45;
  margin: 0;
}

.export-modal-footer {
  gap: 10px;
}

.export-modal-footer .btn-lg {
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* =============================================================
   ROLE BADGE BUTTON & ROLE SWITCHER MODAL
   ============================================================= */

.role-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  flex-shrink: 0;
}

.role-badge-btn:hover {
  background: #dbeafe;
}

.role-badge-btn.contractor-mode {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.role-badge-btn.contractor-mode:hover {
  background: #d1fae5;
}

.role-modal-box {
  max-width: 500px;
  width: 95%;
}

.role-modal-subtitle {
  font-size: 13.5px;
  color: #4b5563;
  margin-bottom: 14px;
}

.role-selector-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.role-card {
  position: relative;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.2s ease;
}

.role-card:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}

.role-card.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #2563eb;
}

.role-card.selected#roleCardContractor {
  border-color: #16a34a;
  background: #f0fdf4;
  box-shadow: 0 0 0 1px #16a34a;
}

.role-card-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: #dbeafe;
  color: #1d4ed8;
}

.role-card-badge.badge-green {
  background: #dcfce7;
  color: #15803d;
}

.role-card-icon {
  font-size: 24px;
  line-height: 1;
}

.role-card-info {
  flex: 1;
  padding-right: 70px;
}

.role-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.role-card-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

.admin-pin-container {
  margin-top: 14px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.admin-pin-container label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.pin-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pin-hint {
  font-size: 11px;
  color: #94a3b8;
}

/* Contractor Role Banner in Defect Modal */
.contractor-role-banner {
  background: #ecfdf5;
  border: 1.5px solid #10b981;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.contractor-role-banner .banner-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.contractor-role-banner .banner-text {
  font-size: 12.5px;
  color: #065f46;
  line-height: 1.45;
}

/* =============================================================
   CONTRACTOR AFTER-PHOTO SECTION STYLING
   ============================================================= */

.after-photo-section {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 8px;
  padding: 14px;
  margin-top: 14px;
}

.after-section-header {
  margin-bottom: 12px;
}

.after-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.after-badge-tag {
  background: #16a34a;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.after-section-title label {
  font-size: 13.5px;
  font-weight: 700;
  color: #14532d;
  margin: 0;
}

.after-hint {
  font-size: 11.5px;
  color: #15803d;
}

.contractor-note-group {
  margin-bottom: 12px;
}

.contractor-note-group label {
  font-size: 12px;
  font-weight: 600;
  color: #166534;
  margin-bottom: 4px;
  display: block;
}

.btn-success {
  background: #16a34a !important;
  color: #ffffff !important;
  border: none !important;
}

.btn-success:hover {
  background: #15803d !important;
}

/* =============================================================
   MOBILE BOTTOM SHEET / DRAWER STYLING
   ============================================================= */

.modal-bottom-sheet {
  align-items: flex-end !important;
  padding: 0 !important;
}

.bottom-sheet-content {
  background: #ffffff;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 12px 18px max(env(safe-area-inset-bottom, 16px), 20px);
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  animation: slideUpSheet 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.bottom-sheet-handle {
  width: 44px;
  height: 5px;
  background: #cbd5e1;
  border-radius: 4px;
  margin: 0 auto 10px;
}

.bottom-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 8px;
}

.bottom-sheet-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.mobile-project-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.mpc-folder {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 2px;
}

.mpc-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.mpc-meta {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

.mobile-actions-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.drawer-action-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  width: 100%;
  color: #1e293b;
}

.drawer-action-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.drawer-action-btn.primary {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.drawer-action-btn.primary:hover {
  background: #dbeafe;
}

.drawer-action-btn svg {
  flex-shrink: 0;
}

.drawer-action-text {
  display: flex;
  flex-direction: column;
}

.drawer-action-text b {
  font-size: 13.5px;
  font-weight: 600;
}

.drawer-action-text span {
  font-size: 11.5px;
  color: #64748b;
}

.drawer-action-btn.primary .drawer-action-text span {
  color: #3b82f6;
}

.drawer-export-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.drawer-export-row .btn {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.bottom-sheet-footer .btn-block {
  width: 100%;
  padding: 10px;
  font-weight: 600;
}

/* =============================================================
   IPHONE & MOBILE VIEWPORT FIXES
   ============================================================= */

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.app-container {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  height: 100vh;
  height: 100dvh;
}

/* Safe area support for iOS Notch / Dynamic Island & Home Bar */
@supports (padding-top: env(safe-area-inset-top)) {
  .top-nav {
    padding-top: env(safe-area-inset-top, 0px);
    height: calc(52px + env(safe-area-inset-top, 0px));
  }

  .mobile-bottom-nav {
    padding-bottom: env(safe-area-inset-bottom, 0px);
    height: calc(54px + env(safe-area-inset-bottom, 0px));
  }

  @media (max-width: 899px) {
    .main-content {
      height: calc(100dvh - (52px + env(safe-area-inset-top, 0px)) - (54px + env(safe-area-inset-bottom, 0px)));
    }
  }
}

@media (max-width: 600px) {
  .top-nav {
    padding-left: 10px;
    padding-right: 10px;
  }

  .nav-left {
    gap: 8px;
    max-width: 50%;
  }

  .project-summary {
    padding: 4px 8px;
    max-width: 160px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .proj-name {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .proj-folder-tag {
    font-size: 10.5px;
    padding: 1px 4px;
  }

  .nav-actions {
    gap: 6px;
  }

  .role-badge-btn {
    padding: 4px 8px;
    font-size: 11px;
  }

  .mobile-bp-btn {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }

  .mobile-bp-btn svg {
    width: 13px;
    height: 13px;
  }

  .canvas-toolbar {
    padding: 4px 6px;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  .canvas-toolbar .btn {
    padding: 4px 7px;
    font-size: 11px;
    flex-shrink: 0;
  }

  .canvas-toolbar .zoom-display {
    font-size: 11px;
    min-width: 38px;
  }
}

/* =============================================================
   CONTRACTOR DEDICATED VIEW STYLING (MOBILE & DESKTOP)
   ============================================================= */

.contractor-view-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contractor-defect-card {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 14px 16px;
}

.cdc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cdc-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.badge-status-pill.done {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}

.badge-status-pill.pending {
  background: #fef9c3;
  color: #a16207;
  border-color: #fde047;
}

.badge-status-pill.rejected, .badge-status-pill.fix {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

.contractor-reject-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fef2f2;
  border: 1.5px solid #f87171;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.contractor-reject-alert .cra-icon {
  font-size: 20px;
  line-height: 1;
}

.contractor-reject-alert .cra-content {
  flex: 1;
  font-size: 13px;
  color: #991b1b;
}

.contractor-reject-alert .cra-content b {
  display: block;
  font-size: 13.5px;
  margin-bottom: 3px;
}

.contractor-reject-alert .cra-content p {
  margin: 3px 0 6px 0;
  font-weight: 600;
  color: #b91c1c;
}

.contractor-reject-alert .cra-sub {
  font-size: 11.5px;
  color: #7f1d1d;
  display: block;
}

.cdt-approval-card {
  background: #f8fafc;
  border: 2px solid #3b82f6;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.cdt-approval-card .cac-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cdt-approval-card .cac-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e3a8a;
}

.cdt-approval-card .cac-desc {
  font-size: 12px;
  color: #475569;
  margin-bottom: 10px;
}

.cdt-approval-card .cac-btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cdt-approval-card .cac-btn-row button {
  flex: 1;
  min-width: 140px;
  padding: 9px 12px;
  font-weight: 700;
  font-size: 13px;
}

.quick-approve-btn {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-block;
  margin-right: 2px;
}

.quick-approve-btn:hover {
  background: #16a34a;
  color: #ffffff;
}

.quick-reject-btn {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-block;
}

.quick-reject-btn:hover {
  background: #dc2626;
  color: #ffffff;
}

.badge-delay-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
}

.badge-delay-pill.on-time {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-delay-pill.delayed {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.cdc-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px 12px;
  background: #ffffff;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-bottom: 12px;
}

.cdc-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cdc-meta-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.cdc-meta-val {
  font-size: 13px;
  color: #0f172a;
}

.cdc-deadline {
  color: #0284c7;
}

.cdc-desc-box {
  background: #fff7ed;
  border: 1px solid #ffedd5;
  border-left: 4px solid #ea580c;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.cdc-desc-title {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #9a3412;
  margin-bottom: 4px;
}

.cdc-desc-text {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.45;
  margin: 0;
}

.cdc-before-photos {
  margin-top: 10px;
}

.cdc-photos-title {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.contractor-action-card {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.08);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.cac-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 8px;
}

.after-badge-tag {
  background: #16a34a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.cac-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: #14532d;
  margin: 0;
  line-height: 1.3;
}

.cac-hint {
  font-size: 12px;
  color: #15803d;
  margin-bottom: 10px;
  line-height: 1.4;
}

.contractor-photo-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.contractor-camera-btn {
  width: 100% !important;
  box-sizing: border-box;
  padding: 12px 14px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  background: #16a34a !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: normal !important;
  text-align: center;
  cursor: pointer;
}

.contractor-camera-btn:hover {
  background: #15803d !important;
}

.contractor-gallery-btn {
  width: 100% !important;
  box-sizing: border-box;
  padding: 10px 14px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  background: #ffffff !important;
  color: #334155 !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: normal !important;
  text-align: center;
  cursor: pointer;
}

.contractor-gallery-btn:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}

.contractor-note-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: #166534;
  margin-bottom: 4px;
  display: block;
}

#contractorNoteInput {
  width: 100%;
  box-sizing: border-box;
  font-size: 13.5px;
  padding: 9px 12px;
  border-radius: 8px;
}

#contractorGdriveInput {
  width: 100%;
  box-sizing: border-box;
  font-size: 12.5px;
  padding: 8px 12px;
  border-radius: 8px;
}

#btnContractorSubmit {
  width: 100% !important;
  box-sizing: border-box;
  padding: 13px 14px !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  border-radius: 8px;
  white-space: normal !important;
  text-align: center;
  line-height: 1.35;
  transition: all 0.2s ease;
}

#btnContractorSubmit:disabled,
#btnContractorSubmit.disabled-btn {
  opacity: 0.42 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  filter: grayscale(80%) !important;
  background: #cbd5e1 !important;
  border-color: #94a3b8 !important;
  color: #64748b !important;
  box-shadow: none !important;
  transform: none !important;
}

/* ============================================================
   BOTTOM-RIGHT FLOATING LANGUAGE SWITCHER
   ============================================================ */
.lang-switcher-fixed {
  display: none !important;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 90;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 24px;
  padding: 4px 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  backdrop-filter: blur(8px);
}

/* Hide language switcher completely whenever any modal is open */
body.modal-open .lang-switcher-fixed,
.modal-overlay[style*="display: flex"] ~ .lang-switcher-fixed,
.modal-overlay[style*="display:flex"] ~ .lang-switcher-fixed {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.lang-switcher-fixed:hover {
  border-color: #2563eb;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
  transform: translateY(-2px);
}

.lang-select-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-icon {
  font-size: 16px;
  line-height: 1;
}

.lang-switcher-fixed select {
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  outline: none;
  padding: 2px 2px 2px 0;
  font-family: inherit;
}

.lang-switcher-fixed select option {
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
  background: #ffffff;
}

/* Elevated on mobile devices so it stays above the mobile bottom navigation */
@media (max-width: 768px) {
  .lang-switcher-fixed {
    bottom: 68px;
    right: 12px;
    padding: 3px 8px;
    border-radius: 20px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
  }
  .lang-switcher-fixed select {
    font-size: 12px;
  }

  /* Contractor View Font & Layout Optimization on iPhone/Mobile */
  .modal-overlay {
    padding: 6px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .modal-box {
    width: calc(100vw - 12px) !important;
    max-width: 100% !important;
    max-height: calc(100vh - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }

  .modal-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 10px 10px !important;
    box-sizing: border-box !important;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 #f1f5f9;
  }

  .photo-actions-bar label.btn,
  .photo-actions-bar .btn {
    flex: 1 1 calc(50% - 4px);
    font-size: 11.5px !important;
    padding: 7px 6px !important;
    min-width: 115px;
  }

  .contractor-defect-card {
    padding: 10px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .contractor-action-card {
    padding: 10px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .cac-header h4 {
    font-size: 14px !important;
    line-height: 1.35 !important;
  }

  .cac-hint {
    font-size: 11.5px !important;
    line-height: 1.35 !important;
    margin-bottom: 8px !important;
  }

  .contractor-photo-btns {
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .contractor-camera-btn {
    width: 100% !important;
    padding: 12px 10px !important;
    font-size: 13.5px !important;
    min-height: 44px !important;
  }

  .contractor-gallery-btn {
    width: 100% !important;
    padding: 10px 10px !important;
    font-size: 12.5px !important;
    min-height: 40px !important;
  }

  .contractor-note-group label {
    font-size: 12px !important;
  }

  #contractorNoteInput {
    font-size: 13.5px !important;
    padding: 8px 10px !important;
  }

  #contractorGdriveInput {
    font-size: 12px !important;
    padding: 7px 10px !important;
  }

  #btnContractorSubmit {
    font-size: 14px !important;
    padding: 12px 10px !important;
    min-height: 46px !important;
    line-height: 1.3 !important;
    white-space: normal !important;
  }
}

/* =========================================================================
   DASHBOARD & EXECUTIVE REPORTING STYLES (CĐT & GIÁM SÁT)
   ========================================================================= */

/* Navigation View Switcher (Dashboard vs Workspace) */
.nav-view-switcher {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
  border: 1px solid #e2e8f0;
  margin-left: 8px;
}

.nav-switcher-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-switcher-btn:hover {
  color: #0f172a;
}

.nav-switcher-btn.active {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Dashboard Container */
.dashboard-container {
  flex: 1;
  overflow-y: auto;
  background: #f8fafc;
  padding: 18px 24px 30px;
}

.dashboard-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Dashboard Header */
.db-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: #ffffff;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.db-title-with-badge {
  display: flex;
  align-items: center;
  gap: 14px;
}

.db-main-icon {
  font-size: 32px;
  line-height: 1;
}

.db-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.db-subtitle {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 2px;
}

.db-header-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.db-scope-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.db-select {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  max-width: 280px;
}

/* KPI Cards Grid */
.db-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.db-kpi-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.db-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.kpi-icon-box {
  font-size: 26px;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-total .kpi-icon-box { background: #eff6ff; }
.kpi-closed .kpi-icon-box { background: #f0fdf4; }
.kpi-pending .kpi-icon-box { background: #fefce8; }
.kpi-open .kpi-icon-box { background: #fef2f2; }
.kpi-delayed .kpi-icon-box { background: #fff7ed; }

.kpi-info {
  flex: 1;
  overflow: hidden;
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  color: #0f172a;
}

.kpi-closed .kpi-value { color: #16a34a; }
.kpi-pending .kpi-value { color: #d97706; }
.kpi-open .kpi-value { color: #dc2626; }
.kpi-delayed .kpi-value { color: #ea580c; }

.kpi-sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

/* Progress Multi-Bar Card */
.db-progress-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.dpc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dpc-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #1e293b;
}

.dpc-rate-badge {
  font-size: 13px;
  font-weight: 700;
  background: #dcfce7;
  color: #15803d;
  padding: 3px 10px;
  border-radius: 12px;
}

.db-multi-progress-bar {
  height: 14px;
  background: #f1f5f9;
  border-radius: 7px;
  overflow: hidden;
  display: flex;
  border: 1px solid #e2e8f0;
}

.dmp-segment {
  height: 100%;
  transition: width 0.4s ease;
}

.seg-closed { background: #16a34a; }
.seg-pending { background: #f59e0b; }
.seg-open { background: #ef4444; }

.dmp-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  font-size: 12.5px;
  color: #475569;
  margin-top: 4px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-closed { background: #16a34a; }
.dot-pending { background: #f59e0b; }
.dot-open { background: #ef4444; }

/* 2-Column Analytic Grid */
.db-analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 16px;
}

.db-analytic-card, .db-projects-card, .db-pending-approval-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.dac-header, .dpc-header-row, .dpa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1.5px solid #f1f5f9;
}

.dac-title, .dpa-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

.dac-badge {
  font-size: 11.5px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: 10px;
}

.db-table-box {
  max-height: 320px;
  overflow-y: auto;
}

.db-stat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.db-stat-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
}

.db-stat-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

.db-stat-table tr:hover td {
  background: #f8fafc;
}

/* Rate bar in table */
.tbl-rate-bar-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tbl-rate-bar {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.tbl-rate-fill {
  height: 100%;
  background: #16a34a;
  border-radius: 3px;
}

/* Pending Approvals Queue */
.dpa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.dpa-card, .dpa-item-card {
  border: 1px solid #fed7aa;
  background: #ffffff;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.15s ease;
}

.dpa-card:hover, .dpa-item-card:hover {
  transform: translateY(-2px);
  border-color: #f97316;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.12);
}

.dpa-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dpa-no-badge {
  background: #fef3c7;
  color: #b45309;
  font-weight: 700;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #fde68a;
}

.dpa-proj-tag {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dpa-desc {
  font-size: 13px;
  color: #1e293b;
  line-height: 1.4;
  margin-top: 2px;
}

.dpa-contractor-info {
  font-size: 12.5px;
  color: #15803d;
  background: #f0fdf4;
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 3px solid #22c55e;
}

.dpa-thumbs-row {
  display: flex;
  gap: 10px;
  margin: 8px 0;
}

.dpa-thumb-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dpa-thumb-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.dpa-thumb {
  width: 100%;
  height: 95px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.dpa-thumb:hover {
  opacity: 0.9;
}

.dpa-thumb.thumb-after {
  border: 2px solid #22c55e;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.dpa-thumb-placeholder {
  width: 100%;
  height: 95px;
  border-radius: 6px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

.dpa-review-btn {
  width: 100%;
  font-weight: 700;
  padding: 8px 12px;
  margin-top: 4px;
  justify-content: center;
}

/* ------------------------------------------------------------- */
/* ACCOUNT AUTHENTICATION, PERMISSIONS & SYNC AUDIT LOG STYLES   */
/* ------------------------------------------------------------- */
.account-profile-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.apc-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 15px;
}

.apc-role-tag {
  background: #f1f5f9;
  color: #334155;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.apc-contractor-tag {
  background: #e0f2fe;
  color: #0369a1;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.btn-locked-contractor {
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
  border: 1px dashed #cbd5e1 !important;
  cursor: not-allowed !important;
  font-size: 11px !important;
  padding: 3px 7px !important;
  opacity: 0.85;
}

.btn-locked-contractor:hover {
  background: #f1f5f9 !important;
}

.contractor-active-filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.login-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

.login-tab-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: #f1f5f9;
  color: #475569;
  transition: all 0.15s ease;
}

.login-tab-btn.active {
  background: #2563eb;
  color: #ffffff;
}

.apc-perm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

/* ------------------------------------------------------------- */
/* PROJECT TREE DROPDOWN & HIERARCHY NAVIGATION STYLES           */
/* ------------------------------------------------------------- */
.project-summary-wrapper {
  position: relative;
  display: inline-flex;
}

.project-tree-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 380px;
  max-width: 92vw;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: ptdFadeIn 0.18s ease-out;
}

@keyframes ptdFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.ptd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.ptd-title {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ptd-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
}

.ptd-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.ptd-search {
  padding: 8px 12px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.ptd-search input {
  width: 100%;
  padding: 7px 10px;
  font-size: 12.5px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  outline: none;
}

.ptd-search input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.ptd-body {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ptd-tree-project {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}

.ptd-project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  cursor: pointer;
  background: #f1f5f9;
  font-weight: 600;
  font-size: 13px;
  color: #1e293b;
  user-select: none;
  transition: background 0.15s ease;
}

.ptd-project-header:hover {
  background: #e2e8f0;
}

.ptd-project-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ptd-count-badge {
  font-size: 11px;
  background: #e2e8f0;
  color: #475569;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}

.ptd-tree-children {
  display: flex;
  flex-direction: column;
  padding: 4px 6px 6px 14px;
  gap: 3px;
  background: #ffffff;
}

.ptd-tree-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
  transition: all 0.12s ease;
}

.ptd-tree-file:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.ptd-tree-file.active {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 600;
}

.ptd-tree-file.locked {
  background: #fff1f2;
  color: #be123c;
  border-left: 3px solid #f43f5e;
}

.ptd-tree-file.locked:hover {
  background: #ffe4e6;
  color: #9f1239;
}

.btn-tree-open {
  background: #2563eb !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3) !important;
  border: none !important;
  white-space: nowrap !important;
  padding: 6px 11px !important;
}

.btn-tree-open:hover {
  background: #1d4ed8 !important;
}

.btn-folder-open {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  padding: 6px 11px !important;
  border-radius: 6px !important;
}

.btn-folder-open:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* ------------------------------------------------------------- */
/* EXPLORER FOLDER CARDS (VIEW BY FOLDER / PROJECT)              */
/* ------------------------------------------------------------- */
.explorer-folders-section {
  margin-bottom: 20px;
}

.efs-title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.explorer-folders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.explorer-folder-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.explorer-folder-card:hover {
  border-color: #3b82f6;
  background: #f8faff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(59, 130, 246, 0.12);
}

.efc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.efc-icon-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
}

.efc-count {
  font-size: 11px;
  background: #dbeafe;
  color: #1d4ed8;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
}

.efc-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #64748b;
}

.efc-action-btn {
  font-size: 11.5px;
  color: #2563eb;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.ptd-footer {
  padding: 8px 12px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

/* ------------------------------------------------------------- */
/* DASHBOARD PENDING REGISTRATION BANNER                         */
/* ------------------------------------------------------------- */
.db-pending-reg-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 10px;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.dprb-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dprb-icon {
  font-size: 20px;
}

.dprb-text {
  font-size: 13px;
  color: #78350f;
  line-height: 1.4;
}

/* ------------------------------------------------------------- */
/* PENDING APPROVAL QUEUE TABLE & BUTTONS                        */
/* ------------------------------------------------------------- */
.btn-approve-reg {
  background: #16a34a;
  color: #ffffff;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s ease;
}

.btn-approve-reg:hover {
  background: #15803d;
}

.btn-reject-reg {
  background: #ef4444;
  color: #ffffff;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  transition: background 0.15s ease;
}

.btn-reject-reg:hover {
  background: #dc2626;
}

.prc-row:hover {
  background: #f8fafc;
}


/* =========================================================================
   PERMANENT VERTICAL LEFT SIDEBAR & BODY LAYOUT
   ========================================================================= */

.app-body-layout {
  display: flex;
  flex: 1;
  width: 100%;
  height: calc(100vh - 54px);
  height: calc(100dvh - 54px);
  overflow: hidden;
  position: relative;
}

.app-left-sidebar {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  height: 100%;
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  z-index: 20;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.02);
  flex-shrink: 0;
}

.app-left-sidebar.collapsed {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  border-right: none !important;
  overflow: hidden !important;
  opacity: 0;
  pointer-events: none;
}

.sidebar-header {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.2px;
}

.sidebar-title-icon {
  font-size: 16px;
}

.sidebar-collapse-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  color: #475569;
  transition: all 0.15s ease;
}

.sidebar-collapse-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #94a3b8;
}

.sidebar-actions {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.sidebar-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.sidebar-action-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.sidebar-search {
  padding: 8px 12px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.sidebar-search input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  outline: none;
  background: #f8fafc;
  transition: all 0.15s ease;
}

.sidebar-search input:focus {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.sidebar-tree-container {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fcfcfd;
}

.tree-root-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
  color: #1d4ed8;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.tree-root-item:hover {
  background: #dbeafe;
}

.tree-root-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tree-root-badge {
  background: #2563eb;
  color: #ffffff;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 700;
}

.tree-folder-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.tree-folder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: #f8fafc;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  transition: background 0.15s ease;
}

.tree-folder-header:hover {
  background: #f1f5f9;
}

.tree-folder-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.tree-folder-title span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-folder-badge {
  background: #e2e8f0;
  color: #475569;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
  margin-left: 6px;
}

.tree-folder-children {
  display: flex;
  flex-direction: column;
  padding: 3px 0;
}

.tree-file-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px 7px 16px;
  border-left: 3px solid transparent;
  cursor: pointer;
  font-size: 12px;
  color: #475569;
  transition: all 0.15s ease;
}

.tree-file-node:hover {
  background: #f8fafc;
  color: #1e293b;
}

.tree-file-node.active {
  background: #eff6ff;
  border-left-color: #2563eb;
  color: #1d4ed8;
  font-weight: 600;
}

.tree-file-node.locked {
  background: #fff1f2;
  color: #9f1239;
}

.tree-file-node.locked:hover {
  background: #ffe4e6;
}

.tree-file-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.tree-file-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-file-branch {
  color: #cbd5e1;
  font-family: monospace;
  font-size: 11px;
}

.tree-file-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}

.tree-file-node.active .tree-file-badge {
  background: #dbeafe;
  color: #1d4ed8;
}

.tree-file-badge-locked {
  background: #fee2e2;
  color: #b91c1c;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
}

.sidebar-footer {
  padding: 10px 12px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.sidebar-active-file {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 10px;
}

.saf-label {
  font-size: 10px;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
}

.saf-val {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* RIGHT VIEWPORT */
.app-main-viewport {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.app-main-viewport .dashboard-container {
  height: 100%;
}

.app-main-viewport .main-content {
  height: 100%;
}

/* TOP NAVBAR NEW TREE NAV & ACTIVE PILL */
.nav-tree-nav-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-nav-tree-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  background: #2563eb;
  color: #ffffff;
  border: none;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
  transition: background 0.15s ease;
}

.btn-nav-tree-toggle:hover {
  background: #1d4ed8;
}

.nav-active-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.nav-active-pill:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.nap-folder {
  color: #475569;
  font-weight: 600;
}

.nap-sep {
  color: #94a3b8;
}

.nap-file {
  color: #1e293b;
  font-weight: 700;
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nap-badge {
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
}

.sidebar-mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 75;
}

/* RESPONSIVE MEDIA QUERIES FOR SIDEBAR */
@media (max-width: 899px) {
  .app-body-layout {
    height: calc(100vh - 54px);
    height: calc(100dvh - 54px);
  }

  .app-left-sidebar {
    position: fixed;
    top: 54px;
    left: 0;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    width: 82% !important;
    min-width: 270px !important;
    max-width: 330px !important;
    z-index: 100;
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
  }

  .app-left-sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  .sidebar-mobile-overlay.active {
    display: block;
  }

  .main-content,
  .dashboard-container {
    height: calc(100dvh - 54px - 56px - env(safe-area-inset-bottom, 0px)) !important;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mobile-bottom-nav {
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
  }

  .lang-switcher-fixed {
    display: none !important;
  }
}


/* ============================================================
   MOBILE OPTIMIZATION & MOBILE MODE VS PC MODE
   ============================================================ */

/* View Mode Toggle Button */
.view-mode-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-mode-toggle-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

/* Floating Canvas Controls on Mobile */
.canvas-mobile-float-actions {
  display: none;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 25;
  gap: 6px;
}

.cm-action-btn {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.cm-action-btn:active {
  background: #2563eb;
  color: #ffffff;
}

.cm-action-btn.cm-btn-full {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
}

.cm-action-btn.cm-btn-full:active {
  background: #1e40af;
}

.cm-action-btn.cm-btn-pin {
  background: #ffffff;
  color: #2563eb;
  border-color: #93c5fd;
}

.cm-action-btn.cm-btn-pin.active,
.cm-action-btn.cm-btn-pin:active {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
}

/* FULLSCREEN DRAWING MODE (CHO ĐIỆN THOẠI & MÁY TÍNH) */
body.full-drawing-mode {
  overflow: hidden !important;
}

body.full-drawing-mode .top-nav,
body.full-drawing-mode .offline-ribbon,
body.full-drawing-mode .app-left-sidebar,
body.full-drawing-mode .mobile-bottom-nav,
body.full-drawing-mode .lang-switcher-fixed,
body.full-drawing-mode .floating-edge-toggle {
  display: none !important;
}

body.full-drawing-mode .app-body-layout {
  height: 100vh !important;
  height: 100dvh !important;
}

body.full-drawing-mode .main-content {
  height: 100vh !important;
  height: 100dvh !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 9999 !important;
  background: #0f172a !important;
}

body.full-drawing-mode .left-panel {
  flex: 1 !important;
  width: 100% !important;
  height: 100% !important;
  background: #0f172a !important;
  border: none !important;
}

body.full-drawing-mode .canvas-toolbar {
  display: none !important;
}

body.full-drawing-mode .canvas-toolbar .tool-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

body.full-drawing-mode .canvas-toolbar .tool-btn.active {
  background: #2563eb;
  border-color: #3b82f6;
}

body.full-drawing-mode .canvas-toolbar .icon-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

body.full-drawing-mode .canvas-toolbar .zoom-label {
  color: #f1f5f9;
}

/* FLOATING FULLSCREEN HUD BAR (HIỆN NỔI TRÊN BẢN VẼ KHI BẬT FULL MÀN) */
.fullscreen-hud-bar {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.hud-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.hud-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

.hud-btn.active {
  background: #2563eb;
  border-color: #60a5fa;
  color: #ffffff;
}

.hud-btn.exit-btn {
  background: #dc2626;
  border-color: #ef4444;
  color: #ffffff;
}

.hud-btn.exit-btn:hover {
  background: #b91c1c;
}

/* Mobile Defect Cards Styling */
.mobile-defect-cards {
  display: none;
}

.m-defect-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.m-defect-card:active {
  background: #f8fafc;
  border-color: #2563eb;
}

.mdc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mdc-no-badge {
  background: #1e293b;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.mdc-room-part {
  font-size: 12px;
  color: #475569;
  font-weight: 600;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mdc-status-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.mdc-status-tag.status-open {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.mdc-status-tag.status-pending {
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #fde68a;
}

.mdc-status-tag.status-done {
  background: #dcfce7;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.mdc-body {
  font-size: 13px;
  color: #0f172a;
  line-height: 1.45;
}

.mdc-desc {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}

.mdc-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  flex-wrap: wrap;
}

.mdc-ctr {
  color: #2563eb;
  font-weight: 600;
}

.mdc-delay {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
}

.mdc-note {
  margin-top: 4px;
  font-size: 12px;
  color: #475569;
  background: #f8fafc;
  padding: 4px 8px;
  border-radius: 6px;
  border-left: 3px solid #2563eb;
}

.mdc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
}

.mdc-thumbs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mdc-thumb-img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #cbd5e1;
}

.mdc-thumb-placeholder {
  font-size: 10px;
  color: #94a3b8;
  font-style: italic;
}

.mdc-btn-action {
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
}

/* ============================================================
   ACTIVE ONLY WHEN ON MOBILE (SCREEN <= 899px) AND NOT FORCE DESKTOP
   ============================================================ */
@media (max-width: 899px) {
  body:not(.force-desktop-mode) .top-nav {
    height: 48px !important;
    padding: 0 10px !important;
  }

  /* Hide heavy desktop navbar switchers that clutter mobile header */
  body:not(.force-desktop-mode) .nav-view-switcher {
    display: none !important;
  }

  /* Allow Sơ Đồ Cây button to be accessible on mobile header */
  body:not(.force-desktop-mode) .btn-nav-tree-toggle {
    display: inline-flex !important;
    padding: 5px 8px !important;
    font-size: 11px !important;
  }

  /* Tools toggle & dropdown on mobile */
  .btn-toggle-tools {
    display: inline-flex !important;
    padding: 4px 8px !important;
    font-size: 11.5px !important;
  }

  .nav-tools-bar {
    display: none;
  }

  .nav-tools-bar.mobile-open {
    display: flex !important;
    position: absolute;
    top: 50px;
    right: 10px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 8px;
    flex-direction: column;
    gap: 6px;
    z-index: 150;
    min-width: 200px;
  }

  .nav-tools-bar.mobile-open button,
  .nav-tools-bar.mobile-open label {
    width: 100%;
    justify-content: flex-start;
    font-size: 12px;
    padding: 8px 12px;
  }

  .pc-only-btn {
    display: none !important;
  }

  .sidebar-collapse-btn {
    display: none !important;
  }

  .mobile-sidebar-close-btn {
    display: inline-block !important;
  }

  body:not(.force-desktop-mode) .top-nav .btn-pdf,
  body:not(.force-desktop-mode) .top-nav .btn-excel,
  body:not(.force-desktop-mode) .mobile-bp-btn,
  body:not(.force-desktop-mode) .btn-ios {
    display: none !important;
  }

  body:not(.force-desktop-mode) .table-actions-group .btn-pdf,
  body:not(.force-desktop-mode) .table-actions-group .btn-excel {
    display: inline-flex !important;
    padding: 5px 8px !important;
    font-size: 11px !important;
    gap: 3px !important;
  }
  body:not(.force-desktop-mode) .table-actions-group #btnAddComment {
    padding: 5px 8px !important;
    font-size: 11px !important;
  }

  /* Show floating mobile canvas controls */
  body:not(.force-desktop-mode) .canvas-mobile-float-actions {
    display: flex !important;
  }

  /* Switch defect table to touch cards on mobile */
  body:not(.force-desktop-mode) .defect-table {
    display: none !important;
  }

  body:not(.force-desktop-mode) .mobile-defect-cards {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 10px 8px !important;
  }

  /* Compact Dashboard on mobile */
  body:not(.force-desktop-mode) .db-kpi-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  body:not(.force-desktop-mode) .kpi-delayed {
    grid-column: span 2 !important;
  }

  body:not(.force-desktop-mode) .db-analytics-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  body:not(.force-desktop-mode) .db-header-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  body:not(.force-desktop-mode) .db-header-right {
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  body:not(.force-desktop-mode) .db-table-box {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body:not(.force-desktop-mode) .db-stat-table th,
  body:not(.force-desktop-mode) .db-stat-table td {
    padding: 6px 8px !important;
    font-size: 11.5px !important;
    white-space: nowrap !important;
  }

  /* Mobile Fullscreen HUD */
  .fullscreen-hud-bar {
    width: 96% !important;
    max-width: 375px !important;
    padding: 4px 6px !important;
    gap: 3px !important;
    top: 8px !important;
  }
  .hud-btn {
    padding: 5px 6px !important;
    font-size: 11px !important;
    gap: 2px !important;
  }
  .hud-btn.exit-btn {
    padding: 5px 8px !important;
  }
  .fullscreen-hud-bar .hud-btn-zoom {
    display: none !important;
  }
}

/* DEDICATED STYLING FOR 'CHỈ COMMENT TẠI BẢN VẼ' BUTTON */
.tool-btn.btn-comment-only {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
  color: #065f46 !important;
  border: 1.5px solid #10b981 !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.2) !important;
}
.tool-btn.btn-comment-only:hover {
  background: #10b981 !important;
  color: #ffffff !important;
}
.tool-btn.btn-comment-only.active {
  background: #059669 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.4) !important;
}

/* ============================================================= */
/* UNIFIED PAN & 2-SECOND HOLD TO COMMENT / MOVE PIN             */
/* ============================================================= */
.mode-toggles {
  display: none !important;
}

#cmBtnPin,
#hudBtnPan,
#hudBtnPin {
  display: none !important;
}

.canvas-viewport {
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

/* Long-press 2s Hold Progress Indicator Overlay */
.hold-progress-overlay {
  position: absolute;
  pointer-events: none;
  z-index: 120;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease-out;
}
.hold-progress-svg {
  transform: rotate(-90deg);
  width: 58px;
  height: 58px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}
.hold-bg-circle {
  fill: rgba(15, 23, 42, 0.85);
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 4;
}
.hold-meter-circle {
  fill: none;
  stroke: #22c55e;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-dasharray: 158;
  stroke-dashoffset: 158;
  transition: stroke-dashoffset 2000ms linear;
}
.hold-progress-dot {
  position: absolute;
  top: 15px;
  font-size: 17px;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  animation: pulseHoldDot 0.8s ease-in-out infinite alternate;
}
@keyframes pulseHoldDot {
  0% { transform: scale(0.92); }
  100% { transform: scale(1.15); }
}
.hold-progress-label {
  margin-top: 7px;
  padding: 4px 10px;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  letter-spacing: 0.2px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.legend-hint-sep {
  margin: 0 8px;
  color: #94a3b8;
}
.legend-hint {
  color: #0369a1;
  font-weight: 500;
}



/* ============================================================
   STREAMLINED MOBILE DASHBOARD ARCHITECTURE & CARD STYLES
   ============================================================ */

.db-mobile-only {
  display: none !important;
}

.db-desktop-only {
  display: block !important;
}

.db-mob-card-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.db-mob-card, .db-mob-proj-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.db-mob-proj-card.active {
  border-color: #3b82f6;
  background: #f8fafc;
  box-shadow: 0 0 0 1.5px rgba(59, 130, 246, 0.25);
}

.db-mob-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.db-mob-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-mob-rate-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  flex-shrink: 0;
}

.db-mob-progress-bar-bg {
  height: 6px;
  background: #f1f5f9;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.db-mob-progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.db-mob-chips-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.db-mob-chip {
  font-size: 10.5px;
  padding: 2.5px 6.5px;
  background: #f1f5f9;
  color: #334155;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.db-mob-chip.chip-done {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
  font-weight: 600;
}

.db-mob-chip.chip-pending {
  background: #fefce8;
  color: #854d0e;
  border-color: #fef08a;
  font-weight: 600;
}

.db-mob-chip.chip-open {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
  font-weight: 600;
}

.db-mob-chip.chip-overdue {
  background: #fff1f2;
  color: #9f1239;
  border-color: #fecdd3;
  font-weight: 700;
}

.db-mob-card-footer {
  margin-top: 3px;
}

/* ============================================================
   MOBILE RESPONSIVE OVERRIDES (SCREEN <= 899px & NOT FORCE DESKTOP)
   ============================================================ */
@media (max-width: 899px) {
  body:not(.force-desktop-mode) .db-desktop-only {
    display: none !important;
  }

  body:not(.force-desktop-mode) .db-mobile-only {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  body:not(.force-desktop-mode) .dashboard-container {
    padding: 10px 10px calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body:not(.force-desktop-mode) .dashboard-inner {
    gap: 10px !important;
  }

  /* Streamline Mobile Dashboard Header */
  body:not(.force-desktop-mode) .db-header-bar {
    padding: 10px 12px !important;
    gap: 8px !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  body:not(.force-desktop-mode) .db-header-left {
    width: 100% !important;
  }

  body:not(.force-desktop-mode) .db-title-with-badge {
    gap: 8px !important;
  }

  body:not(.force-desktop-mode) .db-main-icon {
    font-size: 22px !important;
  }

  body:not(.force-desktop-mode) .db-title {
    font-size: 15px !important;
    line-height: 1.3 !important;
  }

  /* Hide verbose subtitle and redundant buttons on mobile */
  body:not(.force-desktop-mode) .db-subtitle {
    display: none !important;
  }

  body:not(.force-desktop-mode) .db-header-right {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    justify-content: space-between !important;
  }

  body:not(.force-desktop-mode) .db-header-right button:not(#dbBtnReload) {
    display: none !important;
  }

  body:not(.force-desktop-mode) .db-scope-box {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  body:not(.force-desktop-mode) .db-scope-box label {
    display: none !important;
  }

  body:not(.force-desktop-mode) .db-select {
    width: 100% !important;
    max-width: none !important;
    font-size: 12px !important;
    padding: 6px 10px !important;
  }

  body:not(.force-desktop-mode) #dbBtnReload {
    flex-shrink: 0 !important;
    padding: 6px 10px !important;
    font-size: 11.5px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
  }

  /* Pending Registration Banner on Mobile */
  body:not(.force-desktop-mode) .db-pending-reg-banner {
    padding: 8px 12px !important;
    gap: 8px !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  body:not(.force-desktop-mode) .db-pending-reg-banner .dprb-left {
    gap: 8px !important;
  }
  body:not(.force-desktop-mode) .db-pending-reg-banner .dprb-text {
    font-size: 12px !important;
  }
  body:not(.force-desktop-mode) .db-pending-reg-banner button {
    width: 100% !important;
    padding: 6px 10px !important;
    font-size: 11.5px !important;
  }

  /* Streamlined Compact KPI Cards Grid on Mobile */
  body:not(.force-desktop-mode) .db-kpi-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  body:not(.force-desktop-mode) .kpi-delayed {
    grid-column: span 2 !important;
  }

  body:not(.force-desktop-mode) .db-kpi-card {
    padding: 8px 10px !important;
    gap: 8px !important;
    border-radius: 10px !important;
    min-height: 52px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  }

  body:not(.force-desktop-mode) .kpi-icon-box {
    width: 28px !important;
    height: 28px !important;
    font-size: 15px !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
  }

  body:not(.force-desktop-mode) .kpi-info {
    min-width: 0 !important;
  }

  body:not(.force-desktop-mode) .kpi-label {
    font-size: 9.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body:not(.force-desktop-mode) .kpi-value {
    font-size: 19px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    margin: 1px 0 !important;
  }

  body:not(.force-desktop-mode) .kpi-sub {
    font-size: 9.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Streamlined Progress Card on Mobile */
  body:not(.force-desktop-mode) .db-progress-card {
    padding: 10px 12px !important;
    gap: 6px !important;
    border-radius: 10px !important;
  }

  body:not(.force-desktop-mode) .dpc-title {
    font-size: 12.5px !important;
  }

  body:not(.force-desktop-mode) .dpc-rate-badge {
    font-size: 11px !important;
    padding: 2px 7px !important;
  }

  body:not(.force-desktop-mode) .db-multi-progress-bar {
    height: 8px !important;
    border-radius: 4px !important;
    margin: 4px 0 !important;
  }

  body:not(.force-desktop-mode) .dmp-legend {
    gap: 6px 12px !important;
    font-size: 10.5px !important;
    margin-top: 2px !important;
  }

  body:not(.force-desktop-mode) .legend-item {
    gap: 4px !important;
    font-size: 10.5px !important;
  }

  /* Analytic cards & sections on mobile */
  body:not(.force-desktop-mode) .db-analytic-card,
  body:not(.force-desktop-mode) .db-projects-card,
  body:not(.force-desktop-mode) .db-pending-approval-card {
    padding: 10px 12px !important;
    border-radius: 10px !important;
    gap: 8px !important;
  }

  body:not(.force-desktop-mode) .dac-title,
  body:not(.force-desktop-mode) .dpa-title {
    font-size: 13px !important;
  }

  body:not(.force-desktop-mode) .dac-badge {
    font-size: 10.5px !important;
    padding: 1px 6px !important;
  }

  body:not(.force-desktop-mode) .dpc-header-row button {
    font-size: 10.5px !important;
    padding: 3px 6px !important;
  }
}


/* ============================================================
   CONDENSED MOBILE EXECUTIVE SUMMARY STRIP & RICH DEFECT CARDS
   ============================================================ */

.db-summary-strip {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.dss-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dss-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.dss-icon {
  font-size: 18px;
}

.dss-rate-badge {
  font-size: 11.5px;
  font-weight: 700;
  background: #dcfce7;
  color: #15803d;
  padding: 2.5px 8px;
  border-radius: 10px;
}

.dss-progress-bar {
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.dss-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.dss-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.dss-metric-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.dss-metric-box.metric-closed { background: #f0fdf4; border-color: #bbf7d0; }
.dss-metric-box.metric-pending { background: #fefce8; border-color: #fef08a; }
.dss-metric-box.metric-open { background: #fef2f2; border-color: #fecaca; }
.dss-metric-box.metric-overdue { background: #fff1f2; border-color: #fecdd3; }

.dss-m-label {
  font-size: 9.5px;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}

.metric-closed .dss-m-label { color: #166534; }
.metric-pending .dss-m-label { color: #854d0e; }
.metric-open .dss-m-label { color: #991b1b; }
.metric-overdue .dss-m-label { color: #9f1239; }

.dss-m-val {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  margin-top: 2px;
}

.metric-closed .dss-m-val { color: #15803d; }
.metric-pending .dss-m-val { color: #d97706; }
.metric-open .dss-m-val { color: #dc2626; }
.metric-overdue .dss-m-val { color: #b91c1c; }

/* Enhanced Full-Information Mobile Defect Card */
.m-defect-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mdc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 6px;
}

.mdc-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.mdc-no-badge {
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}

.mdc-room-part {
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mdc-status-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
}

.mdc-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mdc-desc {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.mdc-meta-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-size: 11.5px;
  color: #475569;
}

.mdc-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.mdc-note {
  font-size: 11.5px;
  color: #15803d;
  background: #f0fdf4;
  border-left: 3px solid #16a34a;
  padding: 4px 8px;
  border-radius: 4px;
}

.mdc-reject {
  font-size: 11.5px;
  color: #dc2626;
  background: #fef2f2;
  border-left: 3px solid #ef4444;
  padding: 4px 8px;
  border-radius: 4px;
}

.mdc-thumbs-section {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.mdc-thumb-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mdc-thumb-tag {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.mdc-thumb-img {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  border: 1.5px solid #cbd5e1;
  cursor: pointer;
}

.mdc-no-photo {
  font-size: 10.5px;
  color: #94a3b8;
  font-style: italic;
}

.mdc-no-photo.pending {
  color: #d97706;
}

.mdc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
}

.mdc-actions-left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mdc-actions-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mdc-quick-btn {
  font-weight: 700 !important;
  font-size: 11px !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
}

.mdc-btn-icon {
  font-size: 11px !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
}

/* ============================================================
   STRICT MOBILE ENFORCEMENT ON <= 899px SCREENS
   (PREVENTS ANY HORIZONTAL SCROLL OR CUT-OFF TABLES)
   ============================================================ */
@media (max-width: 899px) {
  /* ALWAYS HIDE wide desktop tables on mobile screens */
  .defect-table {
    display: none !important;
  }
  .db-desktop-only {
    display: none !important;
  }

  /* ALWAYS SHOW mobile cards on mobile screens */
  .mobile-defect-cards {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 10px 8px !important;
  }
  .db-mobile-only {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  /* Remove duplicate Sơ Đồ Cây button from mobile header */
  #navTreeNavGroup {
    display: none !important;
  }

  /* Ensure Defect List header controls fit perfectly */
  .table-header-bar {
    padding: 6px 10px !important;
    gap: 6px !important;
  }
  .table-actions-group .btn {
    padding: 5px 8px !important;
    font-size: 11px !important;
  }

  /* Ensure search row on mobile defect list fits without horizontal overflow */
  .table-filter-bar {
    padding: 6px 10px !important;
    gap: 6px !important;
  }
  .table-filter-bar input,
  .table-filter-bar select {
    font-size: 12px !important;
  }
}


/* ============================================================
   ZERO-OVERFLOW MOBILE ARCHITECTURE & DUPLICATE REMOVAL
   ============================================================ */

/* Global hard stop on horizontal overflow */
html, body {
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
  position: relative !important;
  box-sizing: border-box !important;
}

*, *::before, *::after {
  box-sizing: border-box !important;
}

@media (max-width: 899px) {
  /* Enforce zero overflow on all structural containers */
  .app-container,
  .app-body-layout,
  .app-main-viewport,
  .dashboard-container,
  .dashboard-inner,
  .main-content,
  .right-panel,
  .left-panel {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  /* TOP NAVBAR ON MOBILE: Minimal, Spacious, 0px Overflow */
  .top-nav {
    height: 46px !important;
    padding: 0 12px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .nav-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
  }

  .app-logo {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .logo-title {
    display: inline-block !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
  }

  /* HIDE ALL DUPLICATE CONTROLS FROM MOBILE TOP NAVBAR */
  .nav-view-switcher,
  #navTreeNavGroup,
  .btn-nav-tree-toggle,
  .view-mode-toggle-btn,
  .btn-toggle-tools,
  .nav-tools-bar,
  .mobile-bp-btn,
  .pc-only-btn {
    display: none !important;
  }

  .nav-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-left: auto !important;
  }

  /* Compact User Profile Badge on Mobile Header */
  .role-badge-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 4px 8px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 20px !important;
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
    max-width: 150px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .role-badge-text {
    max-width: 100px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .sync-status-pill {
    padding: 4px !important;
    min-width: auto !important;
  }

  /* 4-TAB BOTTOM NAVIGATION: 25% width each, spacious, no overflow */
  .mobile-bottom-nav {
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: calc(54px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 0 4px calc(env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    z-index: 90 !important;
  }

  .nav-tab-btn {
    flex: 1 !important;
    max-width: 25% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 0 !important;
    gap: 2px !important;
    background: none !important;
    border: none !important;
    color: #64748b !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
  }

  .nav-tab-btn.active {
    color: #2563eb !important;
  }

  .nav-tab-btn svg {
    width: 20px !important;
    height: 20px !important;
  }

  /* FIX DSS METRICS GRID: 2 COLUMNS FOR 100% FIT WITHOUT OVERFLOW */
  .dss-metrics-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .dss-metric-box {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}


/* ============================================================
   CONCEPT 02: STREAMLINED DRAWING-CENTRIC FIELD INSPECTOR
   ============================================================ */

/* By default, hide all Concept 02 mobile-specific floating chrome when not active */
body:not(.concept-02-active) .c2-top-bar,
body:not(.concept-02-active) .c2-canvas-hud,
body:not(.concept-02-active) .c2-add-defect-fab,
body:not(.concept-02-active) .c2-pin-card-drawer,
body:not(.concept-02-active) .c2-bottom-sheet {
  display: none !important;
}

/* Concept Switcher Modal Styles (Active in both concepts) */
.concept-choice-card {
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.concept-choice-card:hover {
  border-color: #3b82f6;
  background: #f8fafc;
}
.concept-choice-card.active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}
.concept-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.concept-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.concept-tag.tag-new {
  background: #dbeafe;
  color: #1d4ed8;
}
.concept-tag.tag-classic {
  background: #f1f5f9;
  color: #475569;
}
.concept-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}
.concept-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

/* ============================================================
   WHEN CONCEPT 02 IS ACTIVE (body.concept-02-active)
   ============================================================ */
body.concept-02-active {
  overflow: hidden !important;
}

body.concept-02-active .app-header {
  display: none !important;
}
body.concept-02-active .mobile-bottom-nav {
  display: none !important;
}
body.concept-02-active .app-left-sidebar {
  display: none !important;
}
body.concept-02-active .sidebar-mobile-overlay {
  display: none !important;
}
body.concept-02-active .workspace-top-bar {
  display: none !important;
}
body.concept-02-active .lang-switcher-fixed {
  display: none !important;
}

/* ==========================================================================
   PROJECT ACCESS & TRANSFER PERMISSIONS STYLES (DRAG & DROP)
   ========================================================================== */
.perm-transfer-wrapper {
  display: flex;
  gap: 12px;
  align-items: stretch;
  min-height: 320px;
}
.perm-transfer-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.perm-col-assigned {
  border-color: #a7f3d0;
}
.perm-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  font-size: 13px;
  border-bottom: 1px solid #e2e8f0;
}
.perm-search-box {
  padding: 8px 12px;
  background: #fafafa;
  border-bottom: 1px solid #e2e8f0;
}
.perm-drop-zone {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
  max-height: 280px;
  min-height: 200px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.2s, border-color 0.2s;
}
.perm-drop-zone.drag-hover {
  background: #eff6ff !important;
  border: 2px dashed #3b82f6 !important;
}
.perm-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: #1e293b;
  cursor: grab;
  user-select: none;
  transition: all 0.15s ease;
}
.perm-item:hover {
  border-color: #3b82f6;
  background: #f0fdf4;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}
.perm-item.dragging {
  opacity: 0.4;
  border: 2px dashed #3b82f6;
}
.perm-item-info {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.perm-item-icon {
  font-size: 14px;
}
.perm-item-btn {
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 4px;
  cursor: pointer;
}
.perm-transfer-controls {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 0 4px;
}
@media (max-width: 768px) {
  .perm-transfer-wrapper {
    flex-direction: column;
  }
  .perm-transfer-controls {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ============================================================
   STREAMLINED MOBILE DRAWING PICKER & ACTION SHEET STYLES
   ============================================================ */
.c2-offline-counter-pill {
  background: #f0fdf4 !important;
  color: #166534 !important;
  border: 1px solid #86efac !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.c2-folder-group {
  margin-bottom: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}
.c2-folder-header {
  padding: 8px 12px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid transparent;
  transition: background 0.15s;
}
.c2-folder-header:hover {
  background: #f1f5f9;
}
.c2-folder-group.open .c2-folder-header {
  border-bottom-color: #e2e8f0;
  background: #f1f5f9;
}
.c2-folder-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}
.c2-folder-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.c2-folder-drawings {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
}
.c2-folder-group.collapsed .c2-folder-drawings {
  display: none !important;
}

.c2-drawing-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  transition: all 0.15s ease;
}
.c2-drawing-card:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.c2-drawing-card.active {
  border-color: #3b82f6;
  background: #eff6ff;
}
.c2-drawing-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  padding-right: 8px;
}
.c2-drawing-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.c2-drawing-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}
.c2-drawing-btns {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.c2-btn-icon-touch {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}
.c2-btn-icon-touch:hover {
  background: #f1f5f9;
}
.c2-btn-icon-touch.cached {
  background: #f0fdf4;
  border-color: #86efac;
  color: #16a34a;
}
.c2-btn-more-dots {
  font-weight: bold;
  font-size: 16px;
  color: #475569;
}

/* Mobile Action Sheet (Bottom Drawer) */
.c2-action-sheet {
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  max-width: 500px;
  width: 100%;
  margin: auto auto 0 auto;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  overflow-y: auto;
  animation: c2SlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes c2SlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.c2-action-sheet-handle {
  width: 40px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 2px;
  margin: 10px auto 4px auto;
}
.c2-action-sheet-header {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.c2-action-sheet-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.c2-action-menu-list {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.c2-action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  transition: background 0.15s;
}
.c2-action-item:hover, .c2-action-item:active {
  background: #f8fafc;
}
.c2-action-item .cai-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.c2-action-item .cai-text {
  flex: 1;
  min-width: 0;
}
.c2-action-item .cai-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
}
.c2-action-item .cai-desc {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.35;
}
.c2-action-item .cai-arrow {
  color: #94a3b8;
  font-size: 14px;
  font-weight: bold;
}

body.concept-02-active #dashboardView {
  display: none !important;
}
body.concept-02-active #tablePanel,
body.concept-02-active .mobile-tab-table,
body.concept-02-active .mobile-tab-defects {
  display: none !important;
}
body.concept-02-active .mobile-drawing-hints,
body.concept-02-active #mobileDrawingHints,
body.concept-02-active #hudControls,
body.concept-02-active .hud-controls,
body.concept-02-active .canvas-mobile-float-actions,
body.concept-02-active .canvas-legend,
body.concept-02-active .floating-edge-toggle,
body.concept-02-active .drawing-nav-ribbon {
  display: none !important;
}

body.concept-02-active #appMainViewport {
  width: 100vw !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 10 !important;
}

body.concept-02-active #workspaceView {
  display: flex !important;
  flex: 1 1 100% !important;
  width: 100vw !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
}

body.concept-02-active #drawingViewport {
  width: 100vw !important;
  height: 100dvh !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #cbd5e1;
}

body.concept-02-active #blueprintCanvas {
  display: block;
}

/* 1. C2 Floating Top Capsule */
body.concept-02-active .c2-top-bar {
  display: flex !important;
  position: fixed;
  top: max(8px, env(safe-area-inset-top, 8px));
  left: 8px;
  right: 8px;
  height: 44px;
  z-index: 900;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(203, 213, 225, 0.9);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  padding: 4px 8px;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  white-space: nowrap;
}
body.concept-02-active .c2-top-bar::-webkit-scrollbar {
  display: none;
}

.c2-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: none;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  box-sizing: border-box;
}

.c2-drawing-btn {
  background: #f1f5f9;
  color: #0f172a;
  flex: 1 1 auto;
  min-width: 120px;
  max-width: calc(100vw - 125px);
  overflow: hidden;
  white-space: nowrap;
  border: 1px solid #cbd5e1;
  padding: 0 10px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.c2-drawing-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
  font-weight: 700;
  color: #0f172a;
}
.c2-drawing-ratio {
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 1px 5px;
  border-radius: 6px;
  flex-shrink: 0;
  margin: 0 2px;
}
.c2-drawing-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.c2-chevron {
  font-size: 10px;
  color: #64748b;
  margin-left: 2px;
}

.c2-top-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.c2-top-right::-webkit-scrollbar {
  display: none;
}

.c2-concept-toggle-btn {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  padding: 0 8px;
}
.c2-badge-c2 {
  font-weight: 800;
  font-size: 12px;
}

.c2-role-btn {
  background: #f8fafc;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  padding: 0 8px;
  font-size: 12px;
}

.c2-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px #d1fae5;
  flex-shrink: 0;
}
.c2-online-dot.offline {
  background: #ef4444;
  box-shadow: 0 0 0 2px #fee2e2;
}

/* 2. C2 Canvas Zoom HUD */
body.concept-02-active .c2-canvas-hud {
  display: flex !important;
  position: fixed;
  top: max(60px, calc(env(safe-area-inset-top, 0px) + 56px));
  right: 12px;
  z-index: 850;
  flex-direction: column;
  gap: 6px;
}

.c2-hud-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(203, 213, 225, 0.85);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.1);
  color: #1e293b;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, background-color 0.15s;
}
.c2-hud-btn:active {
  transform: scale(0.92);
  background: #f1f5f9;
}

/* 3. C2 Floating Add Defect FAB (Hidden as requested: defect placement is done via 1s hold) */
.c2-add-defect-fab,
body.concept-02-active .c2-add-defect-fab {
  display: none !important;
}

/* 4. C2 Quick Pin Inspection Pop-up Card */
body.concept-02-active .c2-pin-card-drawer {
  display: none; /* Must be hidden by default! Only shows when user taps on a pin */
  position: fixed;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  left: 10px;
  right: 10px;
  z-index: 980;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  max-height: 70vh;
  animation: c2SlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

body.concept-02-active .c2-pin-card-drawer.open {
  display: block !important;
}

@keyframes c2SlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.c2-pin-card-inner {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(70vh - 12px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.c2-pin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.c2-pin-card-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.c2-pin-no-pill {
  background: #10b981;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
}
.c2-pin-room-pill {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}
.c2-pin-close-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 4px;
}

.c2-pin-card-desc {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.c2-pin-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  flex-wrap: wrap;
}

.c2-pin-card-photos {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.c2-pin-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #cbd5e1;
  cursor: pointer;
}
.c2-pin-photo-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.c2-pin-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.c2-btn-action {
  flex: 1;
  height: 34px;
  border-radius: 8px;
  border: none;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: opacity 0.15s;
}
.c2-btn-action:active {
  opacity: 0.85;
}
.c2-btn-approve {
  background: #10b981;
  color: #fff;
}
.c2-btn-reject {
  background: #ef4444;
  color: #fff;
}
.c2-btn-edit {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}
.c2-btn-upload {
  background: #2563eb;
  color: #fff;
}

/* 5. C2 Interactive Swipeable Bottom Sheet */
body.concept-02-active .c2-bottom-sheet {
  display: flex !important;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 950;
  background: #ffffff;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.16);
  border-top: 1px solid #cbd5e1;
  flex-direction: column;
  transition: height 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: height;
  box-sizing: border-box;
  overflow: hidden !important;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
}

.c2-bottom-sheet.collapsed {
  height: calc(52px + max(12px, env(safe-area-inset-bottom, 12px)));
}
.c2-bottom-sheet.half {
  height: 52vh;
}
.c2-bottom-sheet.full {
  height: 88vh;
}

.c2-sheet-handle-bar {
  width: 100%;
  padding: 8px 0 4px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  flex-shrink: 0;
  background: #ffffff;
}

.c2-sheet-pill-handle {
  width: 38px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 999px;
}

.c2-sheet-peek {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 10px 4px 10px;
  user-select: none;
  background: #ffffff;
  flex-shrink: 0;
  box-sizing: border-box;
  border-bottom: 1px solid #f1f5f9;
}

.c2-sheet-peek-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.c2-sheet-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}
.c2-sheet-count {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}
.c2-sheet-dot {
  color: #94a3b8;
}
.c2-sheet-kpi-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2.5px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.c2-sheet-kpi-badge.done {
  background: #d1fae5;
  color: #065f46;
}
.c2-sheet-kpi-badge.pending {
  background: #fef3c7;
  color: #92400e;
}
.c2-sheet-kpi-badge.open,
.c2-sheet-kpi-badge.late {
  background: #fee2e2;
  color: #b91c1c;
}

.c2-sheet-toggle-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}
.c2-sheet-toggle-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* Scrollable Comment List & Content Container */
.c2-sheet-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  background: #f8fafc;
}

.c2-sheet-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  border-bottom: none;
  overflow-x: auto;
  flex-shrink: 1;
  flex-grow: 1;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  white-space: nowrap;
}
.c2-sheet-filters::-webkit-scrollbar {
  display: none;
}

.c2-filter-chip {
  flex-shrink: 0;
  height: 30px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}
.c2-filter-chip:hover {
  background: #f1f5f9;
}
/* Inactive chips hide label and parentheses to fit 375px screen */
.c2-filter-chip .chip-label,
.c2-filter-chip .chip-paren {
  display: none;
}
/* Active chip expands to display full label */
.c2-filter-chip.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  font-weight: 700;
  padding: 0 9px;
}
.c2-filter-chip.active .chip-label,
.c2-filter-chip.active .chip-paren {
  display: inline;
}
/* Contractor Select Chip */
.c2-chip-contractor {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  max-width: 82px;
  text-overflow: ellipsis;
  overflow: hidden;
  height: 30px;
}

/* Dedicated Vertically Scrollable Defect Comment Stream */
.c2-defect-list,
.c2-sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #f1f5f9;
}

.c2-defect-list::-webkit-scrollbar,
.c2-sheet-body::-webkit-scrollbar {
  width: 6px;
  display: block !important;
}
.c2-defect-list::-webkit-scrollbar-track,
.c2-sheet-body::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.c2-defect-list::-webkit-scrollbar-thumb,
.c2-sheet-body::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}
.c2-defect-list::-webkit-scrollbar-thumb:hover,
.c2-sheet-body::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

.c2-filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.c2-filter-pills::-webkit-scrollbar {
  display: none;
}
.c2-filter-pill {
  flex-shrink: 0;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
}
.c2-filter-pill.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.c2-sheet-search-row {
  display: flex;
  gap: 6px;
}
.c2-search-input {
  flex: 1;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12.5px;
  outline: none;
  background: #f8fafc;
}
.c2-search-input:focus {
  border-color: #2563eb;
  background: #fff;
}
.c2-contractor-select {
  width: 110px;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 6px;
  font-size: 12px;
  background: #f8fafc;
  outline: none;
}

.c2-defect-stream {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.c2-defect-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
}
.c2-defect-card:hover, .c2-defect-card.active {
  border-color: #3b82f6;
  background: #fbfdff;
}

.c2-dc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.c2-dc-pill-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.c2-dc-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}
.c2-dc-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #64748b;
  flex-wrap: wrap;
}
.c2-dc-photos {
  display: flex;
  gap: 6px;
  padding: 4px 0;
}
.c2-dc-thumb {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
}

/* 6. C2 Quick Drawing Picker Modal */
.c2-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1050;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.c2-modal-backdrop.open,
.c2-modal-backdrop[style*="display: flex"],
.c2-modal-backdrop[style*="display:flex"] {
  display: flex !important;
}
.c2-modal-backdrop[style*="display: none"],
.c2-modal-backdrop[style*="display:none"] {
  display: none !important;
}
.c2-picker-sheet {
  width: 100%;
  max-width: 500px;
  max-height: 75vh;
  background: #ffffff;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  animation: c2SlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}
@media (min-width: 601px) {
  .c2-picker-sheet {
    border-radius: 16px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1) !important;
    max-height: 80vh !important;
  }
}
.c2-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.c2-picker-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.c2-picker-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #94a3b8;
  cursor: pointer;
}
.c2-picker-search {
  margin-bottom: 10px;
}
.c2-picker-search input {
  width: 100%;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  padding: 0 10px;
  font-size: 13px;
  box-sizing: border-box;
  background: #f8fafc;
}
.c2-picker-tree {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 45vh;
}
.c2-picker-item {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
}
.c2-picker-item.active {
  border-color: #2563eb;
  background: #eff6ff;
}
.c2-picker-item-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.c2-picker-footer {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
}
.c2-btn-upload-drawing {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.c2-picker-lang-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
}
.c2-picker-lang-row select {
  font-size: 12px;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
}

/* ============================================================
   CONCEPT 02 & ĐT MODE: OFFLINE INSPECTION & SYNC HUB STYLES
   ============================================================ */

/* Mode Segmented Control: [ 💻 PC | 📱 ĐT ] */
.mode-segmented-pill {
  display: inline-flex !important;
  align-items: center !important;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 2px 3px;
  gap: 3px;
  user-select: none;
  flex-shrink: 0 !important; /* Luôn giữ nguyên kích thước, không bao giờ bị bóp méo */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.mode-seg-btn {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap !important; /* Không xuống dòng hoặc bóp chữ */
  flex-shrink: 0 !important;
  line-height: 1.2;
}
.mode-seg-btn:hover {
  color: #1e293b;
  background: rgba(255, 255, 255, 0.6);
}
.mode-seg-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.35);
}

/* C2 Top Bar Segmented Switcher [ 💻 PC | 📱 ĐT ] (Mobile) */
.c2-mode-segmented-pill {
  display: inline-flex !important;
  align-items: center !important;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
  flex-shrink: 0 !important;
  user-select: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}
.c2-seg-btn {
  border: none;
  background: transparent;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}
.c2-seg-btn:hover {
  color: #1e293b;
}
.c2-seg-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

/* C2 Network & Offline Sync Pill in Top Bar */
.c2-sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.c2-sync-pill.online {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.c2-sync-pill.pending {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  animation: c2-pending-pulse 2s infinite ease-in-out;
}
.c2-sync-pill.offline {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

@keyframes c2-pending-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}

/* C2 Bottom Sheet Quick Sync Button */
.c2-sync-quick-btn {
  display: none !important;
  background: #f59e0b !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  animation: c2-pending-pulse 2s infinite ease-in-out;
}
.c2-sheet-pending-count {
  background: #ffffff;
  color: #b45309;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 10px;
}

/* C2 Offline Banner inside Bottom Sheet Feed */
.c2-offline-banner {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.c2-offline-banner.offline {
  background: #fff1f2;
  border-color: #fecdd3;
}
.c2-offline-banner.has-pending {
  background: #fffbeb;
  border-color: #fef08a;
}
.c2-ob-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.c2-ob-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.c2-ob-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.c2-ob-title {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.c2-ob-desc {
  font-size: 10.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.c2-ob-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.c2-ob-btn {
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.c2-ob-btn.btn-dl {
  background: #3b82f6;
  color: #ffffff;
}
.c2-ob-btn.btn-dl:hover {
  background: #2563eb;
}
.c2-ob-btn.btn-sync {
  background: #10b981;
  color: #ffffff;
}
.c2-ob-btn.btn-sync:hover {
  background: #059669;
}

/* Offline Drawing Picker Button */
.c2-picker-offline-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px dashed #94a3b8;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.c2-picker-offline-btn:hover {
  background: #e2e8f0;
  border-color: #64748b;
  color: #0f172a;
}

/* C2 Offline Modal Card & Status */
#c2OfflineModal .modal-box {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.c2-offline-status-card {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.c2-offline-status-card.online {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}
.c2-offline-status-card.offline {
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.c2-osc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.c2-osc-label {
  color: #475569;
  font-weight: 500;
}
.c2-osc-val {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.c2-offline-steps {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 12px;
  color: #475569;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.c2-step-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.4;
}
.c2-step-num {
  background: #e2e8f0;
  color: #334155;
  font-size: 10px;
  font-weight: 800;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* HIDE FLOATING LANGUAGE SELECTOR ON MOBILE & IN CONCEPT 02 */
@media (max-width: 899px) {
  .lang-switcher-fixed {
    display: none !important;
  }
}
body.concept-02-active .lang-switcher-fixed {
  display: none !important;
}

/* ==========================================================================
   PROJECT ACCESS & TRANSFER PERMISSIONS STYLES (DRAG & DROP)
   ========================================================================== */
.perm-transfer-wrapper {
  display: flex;
  gap: 12px;
  align-items: stretch;
  min-height: 320px;
}
.perm-transfer-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.perm-col-assigned {
  border-color: #a7f3d0;
}
.perm-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  font-size: 13px;
  border-bottom: 1px solid #e2e8f0;
}
.perm-search-box {
  padding: 8px 12px;
  background: #fafafa;
  border-bottom: 1px solid #e2e8f0;
}
.perm-drop-zone {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
  max-height: 280px;
  min-height: 200px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.2s, border-color 0.2s;
}
.perm-drop-zone.drag-hover {
  background: #eff6ff !important;
  border: 2px dashed #3b82f6 !important;
}
.perm-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: #1e293b;
  cursor: grab;
  user-select: none;
  transition: all 0.15s ease;
}
.perm-item:hover {
  border-color: #3b82f6;
  background: #f0fdf4;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}
.perm-item.dragging {
  opacity: 0.4;
  border: 2px dashed #3b82f6;
}
.perm-item-info {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.perm-item-icon {
  font-size: 14px;
}
.perm-item-btn {
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 4px;
  cursor: pointer;
}
.perm-transfer-controls {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 0 4px;
}
@media (max-width: 768px) {
  .perm-transfer-wrapper {
    flex-direction: column;
  }
  .perm-transfer-controls {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ============================================================
   STREAMLINED MOBILE DRAWING PICKER & ACTION SHEET STYLES
   ============================================================ */
.c2-offline-counter-pill {
  background: #f0fdf4 !important;
  color: #166534 !important;
  border: 1px solid #86efac !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.c2-folder-group {
  margin-bottom: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}
.c2-folder-header {
  padding: 8px 12px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid transparent;
  transition: background 0.15s;
}
.c2-folder-header:hover {
  background: #f1f5f9;
}
.c2-folder-group.open .c2-folder-header {
  border-bottom-color: #e2e8f0;
  background: #f1f5f9;
}
.c2-folder-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}
.c2-folder-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.c2-folder-drawings {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
}
.c2-folder-group.collapsed .c2-folder-drawings {
  display: none !important;
}

.c2-drawing-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  transition: all 0.15s ease;
}
.c2-drawing-card:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.c2-drawing-card.active {
  border-color: #3b82f6;
  background: #eff6ff;
}
.c2-drawing-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  padding-right: 8px;
}
.c2-drawing-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.c2-drawing-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}
.c2-drawing-btns {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.c2-btn-icon-touch {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}
.c2-btn-icon-touch:hover {
  background: #f1f5f9;
}
.c2-btn-icon-touch.cached {
  background: #f0fdf4;
  border-color: #86efac;
  color: #16a34a;
}
.c2-btn-more-dots {
  font-weight: bold;
  font-size: 16px;
  color: #475569;
}

/* Mobile Action Sheet (Bottom Drawer) */
.c2-action-sheet {
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  max-width: 500px;
  width: 100%;
  margin: auto auto 0 auto;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  overflow-y: auto;
  animation: c2SlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes c2SlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.c2-action-sheet-handle {
  width: 40px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 2px;
  margin: 10px auto 4px auto;
}
.c2-action-sheet-header {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.c2-action-sheet-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.c2-action-menu-list {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.c2-action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  transition: background 0.15s;
}
.c2-action-item:hover, .c2-action-item:active {
  background: #f8fafc;
}
.c2-action-item .cai-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.c2-action-item .cai-text {
  flex: 1;
  min-width: 0;
}
.c2-action-item .cai-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
}
.c2-action-item .cai-desc {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.35;
}
.c2-action-item .cai-arrow {
  color: #94a3b8;
  font-size: 14px;
  font-weight: bold;
}

/* ==========================================================================
   MANDATORY FIRST-SCREEN LOGIN GATE & AUTH LOCK
   ========================================================================== */
html.auth-locked body,
body.auth-locked {
  overflow: hidden !important;
}

html.auth-locked .top-nav,
html.auth-locked .app-body-layout,
html.auth-locked .concept-02-root,
html.auth-locked .offline-ribbon,
html.auth-locked .lang-switcher-fixed,
body.auth-locked .top-nav,
body.auth-locked .app-body-layout,
body.auth-locked .concept-02-root,
body.auth-locked .offline-ribbon,
body.auth-locked .lang-switcher-fixed {
  filter: blur(14px) grayscale(70%) !important;
  pointer-events: none !important;
  user-select: none !important;
  opacity: 0.15 !important;
  transition: filter 0.3s ease, opacity 0.3s ease !important;
}

#roleModal.mandatory-login-gate,
.modal-overlay.mandatory-login-gate {
  display: flex !important;
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  width: 100dvw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: rgba(15, 23, 42, 0.88) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  z-index: 999999 !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  filter: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  user-select: auto !important;
}

.modal-overlay.mandatory-login-gate .modal-box {
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  animation: gateModalAppear 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
  z-index: 1000000 !important;
  filter: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.modal-overlay.mandatory-login-gate .modal-box * {
  pointer-events: auto !important;
}

@keyframes gateModalAppear {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-overlay.mandatory-login-gate #roleModalCloseBtn,
.modal-overlay.mandatory-login-gate #roleModalCancelBtn {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* 1-Touch Account Role Quick Selector */
.role-table-select {
  appearance: none;
  -webkit-appearance: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11.5px;
  padding: 4px 22px 4px 8px;
  cursor: pointer;
  outline: none;
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 9px 9px;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23475569%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  transition: all 0.15s ease;
}

.role-table-select.role-sel-admin {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.role-table-select.role-sel-admin:hover {
  background-color: #fde68a;
}

.role-table-select.role-sel-main {
  background-color: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}
.role-table-select.role-sel-main:hover {
  background-color: #c7d2fe;
}

.role-table-select.role-sel-sub {
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}
.role-table-select.role-sel-sub:hover {
  background-color: #e2e8f0;
}




/* =============================================================
   NOTIFICATION CENTER & BELL BADGE STYLES
   ============================================================= */
.btn-nav-notif {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  cursor: pointer;
}
.notif-bell-icon {
  font-size: 15px;
}
.notif-pill-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  line-height: 17px;
  border-radius: 999px;
  text-align: center;
  padding: 0 4px;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.c2-notif-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 5px 9px;
  cursor: pointer;
}
.c2-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  border-radius: 999px;
  text-align: center;
  padding: 0 3px;
  border: 1.5px solid #ffffff;
}

.notif-tab-btn {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.notif-tab-btn:hover {
  background: #f1f5f9;
}
.notif-tab-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  font-weight: 700;
}

.notif-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  transition: all 0.15s ease;
}
.notif-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.notif-card.unread {
  background: #f0f7ff;
  border-color: #bae6fd;
  border-left: 3.5px solid #0284c7;
}
.notif-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0369a1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.notif-icon-box.defect_new { background: #fee2e2; color: #dc2626; }
.notif-icon-box.defect_return_photo { background: #fef3c7; color: #d97706; }
.notif-icon-box.defect_approved { background: #dcfce7; color: #16a34a; }
.notif-icon-box.defect_rejected { background: #fee2e2; color: #b91c1c; }
.notif-icon-box.member_registration { background: #f3e8ff; color: #9333ea; }
.notif-icon-box.member_approved { background: #e0e7ff; color: #4f46e5; }
.notif-icon-box.admin_broadcast { background: #e0f2fe; color: #0284c7; }

.notif-content-col {
  flex: 1;
  min-width: 0;
}
.notif-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.notif-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}
.notif-time {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}
.notif-msg {
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
  margin-bottom: 6px;
}
.notif-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.notif-proj-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1.5px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.notif-action-btn {
  font-size: 11px;
  font-weight: 700;
  color: #0284c7;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}
.notif-action-btn:hover {
  text-decoration: underline;
}

.c2-icon-folder-btn {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 44px !important;
  max-width: 90px !important;
  border: 1px solid #cbd5e1 !important;
  padding: 0 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
}

/* DRAWING UPLOAD MODAL & GLOBAL UNDO STYLES */
.upload-opt-card {
  transition: all 0.2s ease;
  user-select: none;
}
.upload-opt-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}
.upload-opt-card.active {
  border-color: #2563eb !important;
  background: #eff6ff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12) !important;
}

.toast {
  pointer-events: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  z-index: 10070 !important;
}

.toast-undo-btn {
  background: #f59e0b !important;
  color: #0f172a !important;
  border: none !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  padding: 5px 12px !important;
  border-radius: 6px !important;
  margin-left: 10px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.15s ease !important;
}
.toast-undo-btn:hover {
  background: #fbbf24 !important;
  transform: scale(1.05) !important;
}
.toast-undo-btn:active {
  transform: scale(0.96) !important;
}

.c2-hud-undo-btn {
  background: #fffbeb !important;
  border-color: #fde68a !important;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3) !important;
  animation: pulseUndo 2s infinite ease-in-out;
}
@keyframes pulseUndo {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* CUSTOM CONTEXT MENU & TREE ACTIONS FOR DRAWING FILES */
.custom-context-menu {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 6px;
  min-width: 220px;
  max-width: 280px;
  user-select: none;
  font-family: inherit;
  animation: contextMenuFadeIn 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes contextMenuFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.ccm-header {
  padding: 8px 10px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
}
.ccm-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ccm-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 4px 0;
}
.ccm-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  color: #334155;
  text-align: left;
  transition: all 0.12s ease;
}
.ccm-item:hover {
  background: #eff6ff;
  color: #1d4ed8;
}
.ccm-item-danger {
  color: #dc2626;
}
.ccm-item-danger:hover {
  background: #fef2f2 !important;
  color: #b91c1c !important;
}
.ccm-item-icon {
  font-size: 15px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* Three dots button on tree file nodes */
.btn-tree-file-action {
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 4px;
  cursor: pointer;
  padding: 1px 5px;
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.btn-tree-file-action:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #0f172a;
  opacity: 1;
}
.explorer-tree-file:hover .btn-tree-file-action,
.tree-file-node:hover .btn-tree-file-action {
  opacity: 1;
}

/* Always sticky action column in Explorer table */
.explorer-table th:last-child {
  position: sticky !important;
  right: 0 !important;
  background: #f8fafc !important;
  z-index: 3 !important;
  box-shadow: -4px 0 8px rgba(0, 0, 0, 0.06);
}
.explorer-table td:last-child {
  position: sticky !important;
  right: 0 !important;
  background: #ffffff !important;
  z-index: 2 !important;
  box-shadow: -4px 0 8px rgba(0, 0, 0, 0.06);
}
.explorer-table tr.active-row td:last-child {
  background: #eff6ff !important;
}
.explorer-table tr:hover td:last-child {
  background: #f1f5f9 !important;
}


/* Ensure PC mode controls are visible when PC mode is selected, regardless of screen width */
body.force-desktop-mode .nav-active-drawing-pill,
body.view-mode-desktop .nav-active-drawing-pill,
body.force-desktop-mode #navTreeNavGroup,
body.view-mode-desktop #navTreeNavGroup,
body.force-desktop-mode .nav-view-switcher,
body.view-mode-desktop .nav-view-switcher,
body.force-desktop-mode .btn-nav-tree-toggle,
body.view-mode-desktop .btn-nav-tree-toggle {
  display: inline-flex !important;
}

body.force-desktop-mode .nav-left,
body.view-mode-desktop .nav-left {
  display: flex !important;
  max-width: none !important;
}

body.force-desktop-mode .top-nav,
body.view-mode-desktop .top-nav {
  height: 58px !important;
  padding: 0 16px !important;
}
