/* ===== Project Builder / Tracker — Styles ===== */

/* Nav tabs */
.nav-tab, .nav-tab-tracker { padding: 10px 16px; font-size: 0.8rem; font-weight: 600; color: #6b7280; border-bottom: 3px solid transparent; transition: all 0.15s; cursor: pointer; white-space: nowrap; }
.nav-tab:hover, .nav-tab-tracker:hover { color: #111; }
.dark .nav-tab:hover, .dark .nav-tab-tracker:hover { color: #f3f4f6; }
.nav-tab.active { color: #0066CC; border-bottom-color: #0066CC; }
.nav-tab-tracker.active { color: #00B050; border-bottom-color: #00B050; }

/* Views */
.view, .tview { display: none; }
.view.active, .tview.active { display: block; }

/* Buttons */
.system-btn { padding: 6px 14px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; cursor: pointer; transition: all 0.15s; border: none; }
.system-btn:hover { opacity: 0.85; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.action-btn { padding: 12px 16px; border-radius: 8px; cursor: pointer; transition: all 0.15s; border: none; text-align: left; }
.action-btn:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.25); }

/* Inputs */
.num-input { width: 78px; padding: 4px 8px; border: 1px solid #d1d5db; border-radius: 4px; font-size: 0.8rem; text-align: center; background: #fff; color: #111; }
.dark .num-input { background: #1f2937; border-color: #374151; color: #f3f4f6; }
.num-input:focus { outline: none; border-color: #00B050; box-shadow: 0 0 0 2px rgba(0,176,80,0.15); }
.select-input { padding: 6px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 0.8rem; background: #fff; color: #111; cursor: pointer; }
.dark .select-input { background: #1f2937; border-color: #374151; color: #f3f4f6; }
.select-input:focus { outline: none; border-color: #00B050; }
.cb { width: 18px; height: 18px; cursor: pointer; accent-color: #00B050; }

/* Toggle */
.toggle { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: #ccc; border-radius: 22px; transition: 0.2s; }
.toggle-slider::before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.2s; }
.toggle input:checked + .toggle-slider { background: #00B050; }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Summary cards */
.summary-card { padding: 12px; border-radius: 8px; border-left: 4px solid; background: #f9fafb; transition: transform 0.15s; }
.dark .summary-card { background: #1f2937; }
.summary-card:hover { transform: translateY(-2px); }

/* Tables */
.pb-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.pb-table th { background: #f3f4f6; padding: 6px 10px; text-align: left; font-weight: 700; border-bottom: 2px solid #d1d5db; white-space: nowrap; }
.dark .pb-table th { background: #374151; border-color: #4b5563; }
.pb-table td { padding: 5px 10px; border-bottom: 1px solid #e5e7eb; }
.dark .pb-table td { border-color: #374151; }
.pb-table tr:hover td { background: #f9fafb; }
.dark .pb-table tr:hover td { background: #1f2937; }
.pb-table .cat-row td { font-weight: 700; background: #e5e7eb; }
.dark .pb-table .cat-row td { background: #374151; }
.pb-table .col-header td { font-weight: 700; color: #6b7280; font-size: 0.7rem; text-transform: uppercase; border-bottom: 2px solid #d1d5db; }
.pb-table .pct-cell { text-align: center; font-size: 0.7rem; font-weight: 600; width: 40px; }
.pb-table .schedule-row td { padding: 4px 10px; }
.pb-table .schedule-label { font-weight: 600; white-space: nowrap; }
.pb-table .schedule-value { font-weight: 700; color: #0066CC; }
.dark .pb-table .schedule-value { color: #60a5fa; }

/* TT2 blocks */
.tt2-block { border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
.dark .tt2-block { border-color: #374151; }
.tt2-block-header { padding: 8px 12px; font-weight: 700; font-size: 0.85rem; color: white; display: flex; justify-content: space-between; align-items: center; }

/* Checkbox cell */
.cb-cell { text-align: center; cursor: pointer; font-size: 1.1rem; user-select: none; }
.cb-cell:hover { background: #f0fdf4; }
.dark .cb-cell:hover { background: #1a2e1a; }

/* Progress bar */
.mini-progress { width: 60px; height: 6px; background: #e5e7eb; border-radius: 3px; display: inline-block; vertical-align: middle; }
.dark .mini-progress { background: #374151; }
.mini-progress-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }

/* Log */
.log-entry { padding: 2px 8px; border-left: 2px solid transparent; }
.log-entry.info { border-color: #0066CC; color: #6b7280; }
.log-entry.success { border-color: #00B050; color: #059669; }
.log-entry.warning { border-color: #A96515; color: #d97706; }
.log-entry.error { border-color: #dc2626; color: #dc2626; }

/* Toast */
.toast { position: fixed; bottom: 20px; right: 20px; padding: 12px 20px; border-radius: 8px; color: white; font-size: 0.85rem; font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,0.3); z-index: 100; animation: fadeIn 0.2s ease-out; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.2s ease-out; }

/* TT0 editor */
.tt0-cat { margin-bottom: 12px; }
.tt0-cat-header { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #f3f4f6; border-radius: 6px; font-weight: 700; }
.dark .tt0-cat-header { background: #374151; }
.tt0-item-row { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 28px; }
.tt0-item-row:hover { background: #f9fafb; }
.dark .tt0-item-row:hover { background: #1f2937; }
.tt0-input { padding: 4px 8px; border: 1px solid #d1d5db; border-radius: 4px; font-size: 0.8rem; background: #fff; color: #111; }
.dark .tt0-input { background: #1f2937; border-color: #374151; color: #f3f4f6; }
.tt0-btn-sm { padding: 2px 8px; font-size: 0.7rem; border-radius: 4px; cursor: pointer; border: none; }

/* System breakdown */
.sys-breakdown-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; background: #f9fafb; }
.dark .sys-breakdown-row { background: #1f2937; }
.sys-breakdown-bar { flex: 1; height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
.dark .sys-breakdown-bar { background: #374151; }
.sys-breakdown-fill { height: 100%; border-radius: 4px; transition: width 0.3s; }

/* Auto-date badge */
.auto-date-badge { font-size: 0.65rem; background: #e0f2fe; color: #0284c7; padding: 1px 6px; border-radius: 4px; margin-left: 4px; }
.dark .auto-date-badge { background: #0c4a6e; color: #7dd3fc; }

/* Project cards (database) */
.project-card { border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px; margin-bottom: 12px; transition: all 0.15s; background: #f9fafb; }
.dark .project-card { border-color: #374151; background: #1f2937; }
.project-card:hover { border-color: #00B050; box-shadow: 0 2px 12px rgba(0,0,0,0.1); }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10,10,15,0.5) 0%, rgba(10,10,15,0.2) 45%, rgba(10,10,15,0.55) 100%),
    url('assets/login_bg_gray.png') center center / cover no-repeat;
}
.login-dynamic-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 130%; height: 130%;
  transform: translate(-50%, -50%);
  background: conic-gradient(from 0deg,
    #1C26B7, #00B0F0, #929C14, #A96515, #8F237A, #1C26B7);
  filter: blur(70px);
  opacity: 0.38;
  animation: dynamicHue 16s linear infinite;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}
@keyframes dynamicHue {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: rgba(255,255,255,0.97);
  border-radius: 18px;
  padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  text-align: center;
}
.dark .login-card { background: rgba(24,24,27,0.97); }
.login-logo-img { display: block; height: 42px; width: auto; margin: 0 auto 16px; }

/* Large faded brand watermark behind login/hub content */
.brand-watermark {
  position: absolute;
  bottom: -10%;
  right: -6%;
  width: 78%;
  max-width: 980px;
  min-width: 380px;
  opacity: 0.16;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  filter: drop-shadow(0 0 60px rgba(255,255,255,0.15));
}
@media (max-width: 640px) {
  .brand-watermark { width: 100%; bottom: -12%; right: -22%; opacity: 0.13; }
}
.login-card, .hub-topbar, .hub-center, .pt-content { position: relative; z-index: 1; }

.login-title { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.04em; color: #111; }
.dark .login-title { color: #f3f4f6; }
.login-subtitle { font-size: 0.8rem; color: #6b7280; margin-bottom: 22px; }
.login-form { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.login-label { font-size: 0.72rem; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 10px; }
.login-input {
  width: 100%; padding: 10px 12px; border-radius: 8px; font-size: 0.9rem;
  border: 1px solid #d1d5db; background: #fff; color: #111; transition: border-color 0.15s;
}
.login-input:focus { outline: none; border-color: #0066CC; box-shadow: 0 0 0 3px rgba(0,102,204,0.15); }
.dark .login-input { background: #27272a; border-color: #3f3f46; color: #f3f4f6; }
.login-error { font-size: 0.78rem; color: #dc2626; background: rgba(220,38,38,0.08); border-radius: 6px; padding: 8px 10px; margin-top: 12px; }
.login-submit-btn {
  margin-top: 18px; padding: 11px; border-radius: 9px; border: none; cursor: pointer;
  font-weight: 700; font-size: 0.85rem; letter-spacing: 0.02em; color: #fff;
  background: linear-gradient(135deg, #0066CC, #1C26B7); transition: opacity 0.15s, transform 0.1s;
}
.login-submit-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.login-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.login-footnote { font-size: 0.68rem; color: #9ca3af; margin-top: 22px; }

/* ============================================================
   HUB PAGE
   ============================================================ */
.hub-page {
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10,10,15,0.55) 0%, rgba(10,10,15,0.25) 45%, rgba(10,10,15,0.6) 100%),
    url('assets/login_bg_gray.png') center center / cover no-repeat;
}
.hub-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 24px; }
.hub-topbar-logo { display: flex; align-items: center; background: rgba(255,255,255,0.92); border-radius: 10px; padding: 6px 12px; }
.hub-topbar-logo img { height: 26px; width: auto; display: block; }
.hub-topbar-right { display: flex; align-items: center; gap: 12px; }
.hub-user-info { display: flex; flex-direction: column; align-items: flex-end; color: #fff; }
.hub-user-name { font-size: 0.85rem; font-weight: 700; }
.hub-user-role { font-size: 0.7rem; color: rgba(255,255,255,0.75); text-transform: uppercase; letter-spacing: 0.04em; }
.hub-center {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
}
.hub-title { color: #fff; font-size: 1.5rem; font-weight: 800; letter-spacing: 0.03em; text-shadow: 0 2px 12px rgba(0,0,0,0.25); }
.hub-subtitle { color: rgba(255,255,255,0.85); font-size: 0.85rem; margin-top: 6px; margin-bottom: 36px; }
.hub-cards {
  display: grid; grid-template-columns: 1fr; gap: 22px; width: 100%; max-width: 560px;
}
@media (min-width: 640px) {
  .hub-cards { grid-template-columns: 1fr 1fr; }
}
.hub-card {
  background: rgba(255,255,255,0.96); border-radius: 20px; padding: 34px 20px;
  cursor: pointer; transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  position: relative; overflow: hidden;
}
.dark .hub-card { background: rgba(24,24,27,0.96); }
.hub-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0,0,0,0.35); }
.hub-card-icon { margin-bottom: 12px; display: flex; align-items: center; justify-content: center; }
.hub-card-icon svg { width: 44px; height: 44px; }
.hub-card-label { font-size: 1rem; font-weight: 800; color: #111; letter-spacing: 0.02em; }
.dark .hub-card-label { color: #f3f4f6; }
.hub-card-desc { font-size: 0.75rem; color: #6b7280; margin-top: 6px; }
.hub-card-builder .hub-card-icon { color: #0066CC; }
.hub-card-tracker .hub-card-icon { color: #00B050; }
.hub-card-lock {
  display: none; font-size: 0.68rem; font-weight: 700; color: #A96515;
  margin-top: 10px; letter-spacing: 0.02em;
}
.hub-card-locked { opacity: 0.55; cursor: not-allowed; }
.hub-card-locked:hover { transform: none; box-shadow: 0 12px 30px rgba(0,0,0,0.25); }
.hub-card-locked .hub-card-lock { display: block; }

/* ============================================================
   CHANGE PASSWORD MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 100;
}
.modal-card {
  width: 100%; max-width: 380px; background: #fff; border-radius: 16px;
  padding: 28px 26px; box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.dark .modal-card { background: #18181b; }
.modal-title { font-size: 1rem; font-weight: 800; color: #111; margin-bottom: 4px; }
.dark .modal-title { color: #f3f4f6; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-cancel-btn {
  flex: 1; padding: 11px; border-radius: 9px; border: 1px solid #d1d5db;
  background: transparent; color: #6b7280; font-weight: 600; font-size: 0.85rem; cursor: pointer;
}
.dark .modal-cancel-btn { border-color: #3f3f46; color: #9ca3af; }
.modal-actions .login-submit-btn { flex: 1; margin-top: 0; }

.change-password-btn { cursor: pointer; }
.hub-change-password-btn { background: rgba(255,255,255,0.18); color: #fff; border: none; padding: 8px 14px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; transition: background 0.15s; }
.hub-change-password-btn:hover { background: rgba(255,255,255,0.3); }

/* ============================================================
   PROJECTS TABLE PAGE (Visitor / Final User)
   ============================================================ */
.pt-content { flex: 1; padding: 24px 32px 48px; position: relative; z-index: 1; }
.pt-table-wrapper { margin-top: 22px; max-width: 1000px; }
.table-wrapper { overflow-x: auto; border-radius: 12px; }
.pt-table {
  width: 100%; border-collapse: collapse; background: rgba(255,255,255,0.96);
  border-radius: 12px; overflow: hidden; font-size: 0.85rem;
}
.dark .pt-table { background: rgba(24,24,27,0.96); color: #f3f4f6; }
.pt-table thead th {
  text-align: left; padding: 12px 16px; background: rgba(0,0,0,0.04);
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280;
}
.dark .pt-table thead th { background: rgba(255,255,255,0.06); color: #9ca3af; }
.pt-table tbody td { padding: 12px 16px; border-top: 1px solid rgba(0,0,0,0.06); }
.dark .pt-table tbody td { border-top: 1px solid rgba(255,255,255,0.08); }
.pt-empty { padding: 24px; text-align: center; color: #6b7280; }
.pt-filters { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.pt-filter-btn {
  padding: 6px 14px; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
  border: 1px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.1); color: #fff; cursor: pointer;
  transition: background 0.15s;
}
.pt-filter-btn:hover { background: rgba(255,255,255,0.22); }
.pt-filter-btn.active { background: #fff; color: #111; border-color: #fff; }
.pt-legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.pt-legend-item { display: flex; align-items: center; gap: 5px; font-size: 0.7rem; color: rgba(255,255,255,0.85); font-weight: 600; }
.pt-status-label { font-size: 0.7rem; color: #6b7280; }
.dark .pt-status-label { color: #9ca3af; }
.pt-fav-star { cursor: pointer; font-size: 1rem; margin-right: 8px; user-select: none; color: #d1d5db; }
.pt-fav-star.is-fav { color: #fbbf24; }
.pt-action-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 14px; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
  border: none; cursor: pointer; margin-right: 6px; transition: opacity 0.15s; white-space: nowrap;
}
.pt-action-btn:hover { opacity: 0.85; }
.pt-view-btn { background: #0066CC; color: #fff; }
.pt-request-btn { background: #A96515; color: #fff; }
.pt-pending-badge, .pt-approved-badge {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 14px; border-radius: 999px; font-size: 0.72rem; font-weight: 700;
}
.pt-pending-badge { background: #fbbf24; color: #78350f; }
.pt-approved-badge { background: #00B050; color: #fff; border: none; cursor: pointer; transition: opacity 0.15s; }
.pt-approved-badge:hover { opacity: 0.85; }

/* ============================================================
   ACCESS REQUESTS (Admin)
   ============================================================ */
.hub-access-requests-btn {
  position: relative; background: rgba(255,255,255,0.18); color: #fff; border: none;
  padding: 8px 14px; border-radius: 999px; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
.hub-access-requests-btn:hover { background: rgba(255,255,255,0.3); }
.access-requests-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: #dc2626; color: #fff; border-radius: 999px; min-width: 18px; height: 18px;
  font-size: 0.65rem; font-weight: 800; padding: 0 5px; margin-left: 6px;
}
.access-requests-list { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.access-request-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,0.04);
}
.dark .access-request-row { background: rgba(255,255,255,0.06); }
.access-request-info { font-size: 0.8rem; }
.access-request-info strong { display: block; font-size: 0.85rem; }
.access-request-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ar-approve-btn, .ar-reject-btn { padding: 5px 10px; border-radius: 8px; font-size: 0.72rem; font-weight: 700; border: none; cursor: pointer; }
.ar-approve-btn { background: #00B050; color: #fff; }
.ar-reject-btn { background: #dc2626; color: #fff; }

/* ============================================================
   VISITOR PASSWORDLESS ACCESS
   ============================================================ */
.visitor-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 14px; color: #9ca3af; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
.visitor-divider::before, .visitor-divider::after { content: ''; flex: 1; height: 1px; background: rgba(0,0,0,0.1); }
.dark .visitor-divider::before, .dark .visitor-divider::after { background: rgba(255,255,255,0.12); }
.visitor-toggle-btn {
  width: 100%; padding: 10px; border-radius: 9px; border: 1px dashed #A96515;
  background: transparent; color: #A96515; font-weight: 700; font-size: 0.8rem; cursor: pointer;
  transition: background 0.15s;
}
.visitor-toggle-btn:hover { background: rgba(169,101,21,0.08); }
.visitor-form { margin-top: 14px; text-align: left; }
.visitor-note { font-size: 0.72rem; color: #6b7280; background: rgba(169,101,21,0.08); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; line-height: 1.4; }
.dark .visitor-note { color: #d1d5db; }
.visitor-submit-btn { background: linear-gradient(135deg, #A96515, #8F237A) !important; }

/* ============================================================
   TT2 COMPACT MODE (when 2 columns selected — keeps all fields visible)
   ============================================================ */
.tt2-compact table { font-size: 0.68rem; }
.tt2-compact td, .tt2-compact th { padding: 3px 4px !important; }
.tt2-compact select, .tt2-compact input { font-size: 0.65rem !important; padding: 2px 4px !important; min-width: 0; }
.tt2-compact .schedule-label { font-size: 0.62rem !important; }
.tt2-compact .auto-date-badge { font-size: 0.55rem !important; padding: 1px 4px !important; }

/* ============================================================
   TT2 STATUS DROPDOWN COLOR SCALE (red -> green by progress weight)
   ============================================================ */
select.status-select-0   { background-color: #fee2e2 !important; color: #991b1b !important; }
select.status-select-10,
select.status-select-25  { background-color: #fed7aa !important; color: #9a3412 !important; }
select.status-select-45,
select.status-select-55  { background-color: #fef08a !important; color: #854d0e !important; }
select.status-select-70,
select.status-select-85  { background-color: #d9f99d !important; color: #3f6212 !important; }
select.status-select-90,
select.status-select-95  { background-color: #bbf7d0 !important; color: #14532d !important; }
select.status-select-100 { background-color: #86efac !important; color: #14532d !important; font-weight: 700; }

/* ============================================================
   DASHBOARD KPI / SEMAPHORE / AREA DRILL-DOWN
   ============================================================ */
.semaphore-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.semaphore-dot-lg { width: 16px; height: 16px; box-shadow: 0 0 0 3px rgba(0,0,0,0.05); }
.sys-breakdown-row { cursor: pointer; border-radius: 8px; padding: 6px; transition: background 0.15s; }
.sys-breakdown-row:hover { background: rgba(0,0,0,0.04); }
.dark .sys-breakdown-row:hover { background: rgba(255,255,255,0.06); }
.area-detail-table { width: 100%; font-size: 0.78rem; border-collapse: collapse; margin-top: 8px; }
.area-detail-table th { text-align: left; padding: 6px 8px; background: rgba(0,0,0,0.04); font-size: 0.68rem; text-transform: uppercase; color: #6b7280; }
.dark .area-detail-table th { background: rgba(255,255,255,0.06); color: #9ca3af; }
.area-detail-table td { padding: 6px 8px; border-top: 1px solid rgba(0,0,0,0.06); }
.dark .area-detail-table td { border-top: 1px solid rgba(255,255,255,0.08); }

/* ============================================================
   BRANDING FOOTER
   ============================================================ */
.brand-footer {
  text-align: center; font-size: 0.68rem; color: #9ca3af; padding: 14px 10px;
  border-top: 1px solid rgba(0,0,0,0.06); line-height: 1.6;
}
.dark .brand-footer { color: #6b7280; border-top-color: rgba(255,255,255,0.08); }
.brand-footer .brand-name { font-weight: 700; color: #6b7280; }
.dark .brand-footer .brand-name { color: #9ca3af; }

/* ============================================================
   ASRS CONFIGURATION VIEW
   ============================================================ */
.asrs-phase-row {
  display: grid; grid-template-columns: 100px 1fr 1fr; gap: 16px; align-items: start;
  padding: 12px; border-radius: 10px; background: rgba(0,176,240,0.06);
}
.dark .asrs-phase-row { background: rgba(0,176,240,0.1); }
.asrs-phase-row .conversion-note { font-size: 0.68rem; color: #6b7280; margin-top: 4px; }
.dark .asrs-phase-row .conversion-note { color: #9ca3af; }

/* ============================================================
   ASRS TT3 — Bottom Rail / Bus Bar operational views
   ============================================================ */
.asrs-phase-block { margin-bottom: 28px; }
.asrs-phase-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 10px; color: #00B0F0; }
.asrs-table { width: 100%; }
.asrs-table td { white-space: nowrap; }
.asrs-busbar-card {
  border: 1px solid rgba(0,0,0,0.08); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px;
  background: rgba(0,176,240,0.04);
}
.dark .asrs-busbar-card { background: rgba(0,176,240,0.08); border-color: rgba(255,255,255,0.08); }
.asrs-busbar-header { font-weight: 700; font-size: 0.85rem; margin-bottom: 8px; }
.asrs-busbar-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 900px) { .asrs-busbar-grid { grid-template-columns: repeat(4, 1fr); } }
.asrs-busbar-grid label { font-size: 0.68rem; color: #6b7280; text-transform: uppercase; display: block; margin-bottom: 3px; }
.dark .asrs-busbar-grid label { color: #9ca3af; }
.asrs-busbar-grid select, .asrs-busbar-grid input { width: 100%; }

/* ============================================================
   ASRS RAIL — per-section horizontal layout
   ============================================================ */
.asrs-rail-aisle { margin-bottom: 16px; padding: 10px; border-radius: 10px; background: rgba(0,176,240,0.04); }
.dark .asrs-rail-aisle { background: rgba(0,176,240,0.08); }
.asrs-rail-aisle-header { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; font-size: 0.85rem; }
.asrs-rail-dates { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; font-size: 0.75rem; }
.asrs-rail-dates label { display: flex; flex-direction: column; gap: 2px; color: #6b7280; }
.dark .asrs-rail-dates label { color: #9ca3af; }
.asrs-rail-sections { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.asrs-rail-section-cell { flex: 0 0 auto; min-width: 64px; text-align: center; }
.asrs-rail-section-label { font-size: 0.62rem; color: #6b7280; margin-bottom: 2px; font-weight: 700; }
.dark .asrs-rail-section-label { color: #9ca3af; }
.asrs-rail-section-cell select { width: 100%; padding: 3px 2px; border-radius: 4px; border: none; text-align: center; }

/* ============================================================
   ASRS BUS BAR — VT / VKS simplified layout
   ============================================================ */
.asrs-busbar-aisle { margin-bottom: 14px; padding: 10px 12px; border-radius: 10px; background: rgba(0,176,240,0.05); }
.dark .asrs-busbar-aisle { background: rgba(0,176,240,0.09); }
.asrs-busbar-aisle-title { font-weight: 700; font-size: 0.85rem; margin-bottom: 8px; }
.asrs-vt-vks-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 800px) { .asrs-vt-vks-row { grid-template-columns: 1fr 1fr; } }
.asrs-vt-vks-item { background: rgba(255,255,255,0.6); border-radius: 8px; padding: 10px; }
.dark .asrs-vt-vks-item { background: rgba(255,255,255,0.04); }
.asrs-vt-vks-label { font-size: 0.75rem; font-weight: 600; margin-bottom: 6px; color: #374151; }
.dark .asrs-vt-vks-label { color: #d1d5db; }
.asrs-vt-vks-tag { display: inline-block; background: #00B0F0; color: #fff; font-size: 0.65rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; margin-right: 6px; }
.asrs-vt-vks-item select { width: 100%; padding: 8px; font-size: 0.9rem; border-radius: 6px; border: none; }
.asrs-vt-vks-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: 0.68rem; color: #6b7280; align-items: center; }
.dark .asrs-vt-vks-meta { color: #9ca3af; }
.asrs-vt-vks-meta label { display: flex; align-items: center; gap: 4px; }
.asrs-vt-vks-meta input[type="date"] { width: 110px; }

/* ============================================================
   ASRS RAIL — Accordion layout (per phase)
   ============================================================ */
.asrs-accordion { margin-bottom: 14px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(0,176,240,0.15); }
.asrs-accordion-header {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 10px 14px; background: rgba(0,176,240,0.08); border: none; cursor: pointer;
}
.dark .asrs-accordion-header { background: rgba(0,176,240,0.14); }
.asrs-accordion-header:hover { background: rgba(0,176,240,0.14); }
.dark .asrs-accordion-header:hover { background: rgba(0,176,240,0.2); }
.asrs-accordion-chevron { display: inline-block; transition: transform 0.15s; font-size: 0.7rem; color: #00B0F0; }
.asrs-accordion-chevron.open { transform: rotate(90deg); }
.asrs-accordion-body { padding: 14px; }

/* Smart Store v2 */
.smartstore-mini-config{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px;align-items:end;padding:8px;background:#f3f4f6;border-radius:7px;margin-top:6px;font-size:.7rem}.dark .smartstore-mini-config{background:#374151}.smartstore-mini-config input{width:100%;padding:4px;border:1px solid #d1d5db;border-radius:4px}.smartstore-tt1-head{display:flex;justify-content:space-between;background:#1C26B7;color:#fff;padding:10px 14px;border-radius:9px;margin-bottom:12px}.smartstore-category-card{border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;margin-bottom:14px}.dark .smartstore-category-card{border-color:#374151}.smartstore-category-title{display:flex;justify-content:space-between;align-items:center;background:#eef2ff;padding:10px 12px}.dark .smartstore-category-title{background:#1e1b4b}.smartstore-category-title span{display:block;font-size:.68rem;color:#6b7280}.smartstore-category-title label{display:flex;align-items:center;gap:8px;font-size:.7rem}.smartstore-tracker-table{border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;margin-bottom:12px}.dark .smartstore-tracker-table{border-color:#374151}.smartstore-tracker-table>summary{display:flex;justify-content:space-between;padding:10px 13px;background:#1C26B7;color:#fff;font-weight:800;cursor:pointer}.smartstore-busbar{padding:12px;display:grid;grid-template-columns:1fr 1fr 2fr;gap:12px;align-items:end}.smartstore-busbar>div{display:flex;align-items:center;gap:10px}.smartstore-schedule label{font-size:.68rem;color:#6b7280}.smartstore-schedule input{display:block;margin-top:3px}@media(max-width:800px){.smartstore-busbar{grid-template-columns:1fr}.smartstore-mini-config{grid-template-columns:1fr}}

/* Stacker Crane — Standard Configuration save box (TT1) */
.crane-std-config-box {
  border: 1px solid #8F237A33;
  background: rgba(143,35,122,0.06);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.dark .crane-std-config-box { background: rgba(143,35,122,0.12); border-color: #8F237A55; }


/* ============================================================
   TRACKER GROUPING — TT2 Standard Conveyors / TT2 ASRS
   ============================================================ */
.asrs-busbar-combined {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin: 10px;
  overflow: hidden;
  background: #fff;
}
.dark .asrs-busbar-combined {
  background: #111827;
  border-color: #374151;
}
.asrs-busbar-combined .asrs-busbar-aisle-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: #f3f4f6;
  font-weight: 800;
}
.dark .asrs-busbar-combined .asrs-busbar-aisle-title {
  background: #1f2937;
}
.asrs-busbar-combined .asrs-busbar-aisle-title strong {
  min-width: 54px;
  text-align: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .72rem;
}
.asrs-busbar-dual-progress {
  display: grid;
  gap: 8px;
  padding: 12px;
}
.asrs-busbar-progress-line {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 220px) 56px;
  gap: 12px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}
.dark .asrs-busbar-progress-line {
  border-color: #374151;
}
.asrs-vt-tag { background: #8F237A !important; }
.asrs-vks-tag { background: #0066CC !important; }
.asrs-busbar-percent {
  text-align: right;
  font-weight: 800;
}
.asrs-busbar-shared-schedule {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 12px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}
.dark .asrs-busbar-shared-schedule {
  background: #1f2937;
  border-color: #374151;
}
.asrs-busbar-shared-schedule label,
.asrs-busbar-shared-schedule span {
  font-size: .7rem;
  color: #6b7280;
}
.asrs-busbar-shared-schedule input {
  display: block;
  width: 100%;
  margin-top: 4px;
}
.asrs-busbar-shared-schedule small {
  display: block;
  margin-bottom: 4px;
}
.asrs-busbar-shared-schedule b {
  display: block;
  color: #111827;
  font-size: .78rem;
}
.dark .asrs-busbar-shared-schedule b {
  color: #f3f4f6;
}
@media (max-width: 900px) {
  .asrs-busbar-progress-line {
    grid-template-columns: 1fr;
  }
  .asrs-busbar-percent {
    text-align: left;
  }
  .asrs-busbar-shared-schedule {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Builder gated workflow */
.builder-locked-section { opacity:.58; position:relative; }
.builder-locked-section::after { content:""; position:absolute; inset:0; background:rgba(255,255,255,.18); border-radius:12px; pointer-events:none; }
.dark .builder-locked-section::after { background:rgba(0,0,0,.16); }
.pt-system-summary { display:block; max-width:280px; color:#4b5563; font-size:.72rem; line-height:1.25; }
.dark .pt-system-summary { color:#9ca3af; }
.asrs-busbar-accordion > summary { cursor:pointer; list-style:none; }
.asrs-busbar-accordion > summary::-webkit-details-marker { display:none; }
.asrs-busbar-accordion > summary::before { content:'▾'; margin-right:8px; }
.asrs-busbar-accordion:not([open]) > summary::before { content:'▸'; }


/* ASRS System heading in Dashboard */
.asrs-system-group-title {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 9px 12px;
  border-left: 5px solid #00B0F0;
  background: linear-gradient(90deg, rgba(0,176,240,.12), transparent);
  border-radius: 6px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.asrs-system-group-title span {
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  color: #0066CC;
}
.asrs-system-group-title small {
  font-size: .68rem;
  color: #6b7280;
}

/* TT3 unified date sequences */
.asrs-phase-schedule,
.asrs-activity-schedule {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 8px;
  align-items: end;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}
.asrs-phase-schedule {
  background: #eef6ff;
  border-left: 4px solid #0066CC;
}
.dark .asrs-phase-schedule,
.dark .asrs-activity-schedule {
  background: #1f2937;
  border-color: #374151;
}
.asrs-phase-schedule label,
.asrs-phase-schedule span,
.asrs-activity-schedule label,
.asrs-activity-schedule span {
  font-size: .68rem;
  color: #6b7280;
}
.asrs-phase-schedule small,
.asrs-activity-schedule small {
  display: block;
  margin-bottom: 4px;
}
.asrs-phase-schedule b,
.asrs-activity-schedule b {
  display: block;
  font-size: .92rem;
  color: #111827;
}
.dark .asrs-phase-schedule b,
.dark .asrs-activity-schedule b {
  color: #f3f4f6;
}
.asrs-live-percent {
  min-width: 54px;
  text-align: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: .72rem;
  font-weight: 800;
}

/* TT3 Bottom Rail — compact Aisle percentage and Phase rollup. */
.asrs-rail-aisle-header{
  flex-wrap:nowrap!important;
  justify-content:space-between!important;
  height:24px!important;
  min-height:24px!important;
  max-height:24px!important;
  padding:2px 10px!important;
  box-sizing:border-box!important;
  cursor:pointer!important;
}
.asrs-rail-aisle-header>span:first-child{min-width:0!important;flex:1 1 auto!important}
.asrs-aisle-title{display:inline-flex!important;align-items:center!important;gap:6px!important;height:20px!important;font-size:.68rem!important;line-height:1!important}
.asrs-aisle-chevron{display:inline-block!important;width:10px!important;font-size:.68rem!important;font-weight:900!important;color:inherit!important}
.asrs-rail-aisle.aisle-collapsed>*:not(.asrs-rail-aisle-header){display:none!important}
.asrs-accordion.phase-collapsed>.asrs-accordion-body{display:none!important}
.asrs-rail-aisle-header .asrs-live-percent{
  min-width:38px!important;
  max-width:46px!important;
  padding:2px 6px!important;
  font-size:.62rem!important;
  line-height:1.1!important;
  white-space:nowrap!important;
  flex:0 0 auto!important;
  box-sizing:border-box!important;
}
.asrs-accordion-header .asrs-phase-title{flex:1 1 auto!important;min-width:0!important}
.asrs-phase-header-metrics{
  margin-left:auto!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  flex:0 0 auto!important;
  white-space:nowrap!important;
}
.asrs-phase-overall-percent{
  display:inline-flex!important;
  align-items:center!important;
  padding:4px 10px!important;
  border-radius:999px!important;
  background:#fff!important;
  color:#111827!important;
  border:1px solid rgba(15,23,42,.12)!important;
  box-shadow:0 1px 3px rgba(0,0,0,.12)!important;
  font-size:.78rem!important;
  font-weight:800!important;
}
.asrs-phase-header-metrics .schedule-health-status{
  padding:4px 10px!important;
  gap:6px!important;
  font-size:.76rem!important;
  font-weight:800!important;
}
.asrs-phase-header-metrics .schedule-health-status i{width:11px!important;height:11px!important;min-width:11px!important}
.asrs-activity-schedule .asrs-schedule-heading{
  height:24px!important;
  min-height:24px!important;
  max-height:24px!important;
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  padding:2px 0!important;
  font-size:.74rem!important;
  font-weight:700!important;
  line-height:1!important;
}
.asrs-rail-aisle .asrs-activity-schedule{
  grid-template-columns:repeat(9,minmax(118px,1fr))!important;
  gap:6px!important;
  padding:6px 10px 9px!important;
  margin:0!important;
  width:100%!important;
  box-sizing:border-box!important;
  align-items:center!important;
}
.asrs-rail-aisle .asrs-activity-schedule>label,
.asrs-rail-aisle .asrs-activity-schedule>span{
  font-size:.72rem!important;
  min-height:40px!important;
  max-height:40px!important;
  padding:4px 6px!important;
  box-sizing:border-box!important;
}
.asrs-rail-aisle .asrs-activity-schedule>label input{font-size:.72rem!important}
.asrs-rail-aisle .asrs-activity-schedule>span{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:6px!important;
  min-height:40px!important;
  white-space:nowrap!important;
}
.asrs-rail-aisle .asrs-activity-schedule>span small,
.asrs-rail-aisle .asrs-activity-schedule>span b{
  display:inline!important;
  margin:0!important;
  font-size:.76rem!important;
  line-height:1.1!important;
}
.asrs-rail-aisle .asrs-rail-section-cell{min-width:98px!important}
.asrs-rail-aisle .asrs-rail-section-label{font-size:.64rem!important;white-space:nowrap!important}
.asrs-rail-aisle .asrs-rail-section-cell select,
.asrs-rail-aisle .asrs-rail-section-cell select option{color:#000!important}
/* Standard semaphore colours for Phase and Aisle Installation. */
.asrs-accordion .schedule-health-status.schedule-green{color:#15803d!important}
.asrs-accordion .schedule-health-status.schedule-green i{background:#16a34a!important}
.asrs-accordion .schedule-health-status.schedule-yellow{color:#b45309!important}
.asrs-accordion .schedule-health-status.schedule-yellow i{background:#f59e0b!important}
.asrs-accordion .schedule-health-status.schedule-red{color:#dc2626!important}
.asrs-accordion .schedule-health-status.schedule-red i{background:#ef4444!important}
.asrs-accordion .schedule-health-status.schedule-gray{color:#6b7280!important}
.asrs-accordion .schedule-health-status.schedule-gray i{background:#9ca3af!important}
.asrs-accordion .schedule-health-status.schedule-black{color:#111827!important}
.asrs-accordion .schedule-health-status.schedule-black i{background:#111827!important}
.asrs-busbar-shared-schedule {
  grid-template-columns: repeat(7, minmax(110px, 1fr)) !important;
}
@media (max-width: 1100px) {
  .asrs-phase-schedule,
  .asrs-activity-schedule,
  .asrs-busbar-shared-schedule {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  }
}

/* Workflow guidance */
@keyframes workflowPulse {
  0%,100% { box-shadow:0 0 0 0 rgba(0,102,204,.15); transform:translateY(0); }
  50% { box-shadow:0 0 0 7px rgba(0,102,204,.18); transform:translateY(-1px); }
}
@keyframes workflowSavePulse {
  0%,100% { box-shadow:0 0 0 0 rgba(0,176,80,.15); }
  50% { box-shadow:0 0 0 9px rgba(0,176,80,.22); }
}
.workflow-selection-pulse { animation:workflowPulse 1.35s ease-in-out infinite; }
.workflow-action-pulse { animation:workflowPulse 1.1s ease-in-out infinite; }
.workflow-save-pulse { animation:workflowSavePulse 1s ease-in-out infinite; }

/* Smart Store installation flow */
.smartstore-flow-mainbar {
  margin:16px 0 8px;
  padding:11px 14px;
  border-radius:9px;
  background:linear-gradient(90deg,#1C26B7,#0066CC);
  color:#fff;
  font-size:.8rem;
  font-weight:900;
  letter-spacing:.08em;
}
.smartstore-flow-mainbar:first-child { margin-top:0; }

/* Overview overall scale placed after the numeric percentage */
.sys-overall-scale {
  position:relative;
  width:min(220px,22vw);
  min-width:120px;
  height:12px;
  border-radius:999px;
  overflow:hidden;
  background:linear-gradient(90deg,#fee2e2,#fef3c7,#dcfce7);
  border:1px solid rgba(107,114,128,.25);
}
.sys-overall-scale span {
  display:block;
  height:100%;
  border-radius:999px;
  opacity:.9;
  transition:width .25s ease;
}
.sys-overall-scale i {
  position:absolute;
  right:5px;
  top:-2px;
  font-size:.55rem;
  line-height:14px;
  font-style:normal;
  color:#374151;
  font-weight:800;
}
.dark .sys-overall-scale i { color:#111827; }
@media(max-width:900px){
  .sys-overall-scale{width:140px;min-width:100px}
}


/* ===== MERGED SITELOG STYLES ===== */
.nav-tab, .nav-tab-tracker, .nav-tab-sitelog, .am-tab { padding: 10px 16px; font-size: 0.8rem; font-weight: 600; color: #6b7280; border-bottom: 3px solid transparent; transition: all 0.15s; cursor: pointer; white-space: nowrap; background: none; border-top: none; border-left: none; border-right: none; }
.nav-tab:hover, .nav-tab-tracker:hover, .nav-tab-sitelog:hover, .am-tab:hover { color: #111; }
.dark .nav-tab:hover, .dark .nav-tab-tracker:hover, .dark .nav-tab-sitelog:hover, .dark .am-tab:hover { color: #f3f4f6; }
.nav-tab.active { color: #0066CC; border-bottom-color: #0066CC; }
.nav-tab-tracker.active { color: #00B050; border-bottom-color: #00B050; }
.nav-tab-sitelog.active { color: #8F237A; border-bottom-color: #8F237A; }
.am-tab.active { color: #4338ca; border-bottom-color: #4338ca; }
.am-view.hidden { display: none; }
.hub-card-access .hub-card-icon { color: #4338ca; }

/* Views */
.view, .tview, .slview { display: none; }
.view.active, .tview.active, .slview.active { display: block; }

/* Buttons */
.system-btn { padding: 6px 14px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; cursor: pointer; transition: all 0.15s; border: none; }
.system-btn:hover { opacity: 0.85; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.action-btn { padding: 12px 16px; border-radius: 8px; cursor: pointer; transition: all 0.15s; border: none; text-align: left; }
.action-btn:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.25); }

/* Inputs */
.num-input { width: 78px; padding: 4px 8px; border: 1px solid #d1d5db; border-radius: 4px; font-size: 0.8rem; text-align: center; background: #fff; color: #111; }
.dark .num-input { background: #1f2937; border-color: #374151; color: #f3f4f6; }
.num-input:focus { outline: none; border-color: #00B050; box-shadow: 0 0 0 2px rgba(0,176,80,0.15); }
.select-input { padding: 6px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 0.8rem; background: #fff; color: #111; cursor: pointer; }
.dark .select-input { background: #1f2937; border-color: #374151; color: #f3f4f6; }
.select-input:focus { outline: none; border-color: #00B050; }
.cb { width: 18px; height: 18px; cursor: pointer; accent-color: #00B050; }

/* Toggle */
.toggle { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: #ccc; border-radius: 22px; transition: 0.2s; }
.toggle-slider::before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.2s; }
.toggle input:checked + .toggle-slider { background: #00B050; }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Summary cards */
.summary-card { padding: 12px; border-radius: 8px; border-left: 4px solid; background: #f9fafb; transition: transform 0.15s; }
.dark .summary-card { background: #1f2937; }
.summary-card:hover { transform: translateY(-2px); }

/* Tables */
.pb-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.pb-table th { background: #f3f4f6; padding: 6px 10px; text-align: left; font-weight: 700; border-bottom: 2px solid #d1d5db; white-space: nowrap; }
.dark .pb-table th { background: #374151; border-color: #4b5563; }
.pb-table td { padding: 5px 10px; border-bottom: 1px solid #e5e7eb; }
.dark .pb-table td { border-color: #374151; }
.pb-table tr:hover td { background: #f9fafb; }
.dark .pb-table tr:hover td { background: #1f2937; }
.pb-table .cat-row td { font-weight: 700; background: #e5e7eb; }
.dark .pb-table .cat-row td { background: #374151; }
.pb-table .col-header td { font-weight: 700; color: #6b7280; font-size: 0.7rem; text-transform: uppercase; border-bottom: 2px solid #d1d5db; }
.pb-table .pct-cell { text-align: center; font-size: 0.7rem; font-weight: 600; width: 40px; }
.pb-table .schedule-row td { padding: 4px 10px; }
.pb-table .schedule-label { font-weight: 600; white-space: nowrap; }
.pb-table .schedule-value { font-weight: 700; color: #0066CC; }
.dark .pb-table .schedule-value { color: #60a5fa; }

/* TT2 blocks */
.tt2-block { border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
.dark .tt2-block { border-color: #374151; }
.tt2-block-header { padding: 8px 12px; font-weight: 700; font-size: 0.85rem; color: white; display: flex; justify-content: space-between; align-items: center; }

/* Checkbox cell */
.cb-cell { text-align: center; cursor: pointer; font-size: 1.1rem; user-select: none; }
.cb-cell:hover { background: #f0fdf4; }
.dark .cb-cell:hover { background: #1a2e1a; }

/* Progress bar */
.mini-progress { width: 60px; height: 6px; background: #e5e7eb; border-radius: 3px; display: inline-block; vertical-align: middle; }
.dark .mini-progress { background: #374151; }
.mini-progress-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }

/* Log */
.log-entry { padding: 2px 8px; border-left: 2px solid transparent; }
.log-entry.info { border-color: #0066CC; color: #6b7280; }
.log-entry.success { border-color: #00B050; color: #059669; }
.log-entry.warning { border-color: #A96515; color: #d97706; }
.log-entry.error { border-color: #dc2626; color: #dc2626; }

/* Toast */
.toast { position: fixed; bottom: 20px; right: 20px; padding: 12px 20px; border-radius: 8px; color: white; font-size: 0.85rem; font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,0.3); z-index: 100; animation: fadeIn 0.2s ease-out; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.2s ease-out; }

/* TT0 editor */
.tt0-cat { margin-bottom: 12px; }
.tt0-cat-header { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #f3f4f6; border-radius: 6px; font-weight: 700; }
.dark .tt0-cat-header { background: #374151; }
.tt0-item-row { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 28px; }
.tt0-item-row:hover { background: #f9fafb; }
.dark .tt0-item-row:hover { background: #1f2937; }
.tt0-input { padding: 4px 8px; border: 1px solid #d1d5db; border-radius: 4px; font-size: 0.8rem; background: #fff; color: #111; }
.dark .tt0-input { background: #1f2937; border-color: #374151; color: #f3f4f6; }
.tt0-btn-sm { padding: 2px 8px; font-size: 0.7rem; border-radius: 4px; cursor: pointer; border: none; }

/* System breakdown */
.sys-breakdown-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; background: #f9fafb; }
.dark .sys-breakdown-row { background: #1f2937; }
.sys-breakdown-bar { flex: 1; height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
.dark .sys-breakdown-bar { background: #374151; }
.sys-breakdown-fill { height: 100%; border-radius: 4px; transition: width 0.3s; }

/* Auto-date badge */
.auto-date-badge { font-size: 0.65rem; background: #e0f2fe; color: #0284c7; padding: 1px 6px; border-radius: 4px; margin-left: 4px; }
.dark .auto-date-badge { background: #0c4a6e; color: #7dd3fc; }

/* Project cards (database) */
.project-card { border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px; margin-bottom: 12px; transition: all 0.15s; background: #f9fafb; }
.dark .project-card { border-color: #374151; background: #1f2937; }
.project-card:hover { border-color: #00B050; box-shadow: 0 2px 12px rgba(0,0,0,0.1); }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10,10,15,0.5) 0%, rgba(10,10,15,0.2) 45%, rgba(10,10,15,0.55) 100%),
    url('assets/login_bg_gray.png') center center / cover no-repeat;
}
.login-dynamic-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 130%; height: 130%;
  transform: translate(-50%, -50%);
  background: conic-gradient(from 0deg,
    #1C26B7, #00B0F0, #929C14, #A96515, #8F237A, #1C26B7);
  filter: blur(70px);
  opacity: 0.38;
  animation: dynamicHue 16s linear infinite;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}
@keyframes dynamicHue {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: rgba(255,255,255,0.97);
  border-radius: 18px;
  padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  text-align: center;
}
.dark .login-card { background: rgba(24,24,27,0.97); }
.login-logo-img { display: block; height: 42px; width: auto; margin: 0 auto 16px; }

/* Large faded brand watermark behind login/hub content */
.brand-watermark {
  position: absolute;
  bottom: -10%;
  right: -6%;
  width: 78%;
  max-width: 980px;
  min-width: 380px;
  opacity: 0.16;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  filter: drop-shadow(0 0 60px rgba(255,255,255,0.15));
}
@media (max-width: 640px) {
  .brand-watermark { width: 100%; bottom: -12%; right: -22%; opacity: 0.13; }
}
.login-card, .hub-topbar, .hub-center, .pt-content { position: relative; z-index: 1; }

.login-title { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.04em; color: #111; }
.dark .login-title { color: #f3f4f6; }
.login-subtitle { font-size: 0.8rem; color: #6b7280; margin-bottom: 22px; }
.login-form { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.login-label { font-size: 0.72rem; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 10px; }
.login-input {
  width: 100%; padding: 10px 12px; border-radius: 8px; font-size: 0.9rem;
  border: 1px solid #d1d5db; background: #fff; color: #111; transition: border-color 0.15s;
}
.login-input:focus { outline: none; border-color: #0066CC; box-shadow: 0 0 0 3px rgba(0,102,204,0.15); }
.dark .login-input { background: #27272a; border-color: #3f3f46; color: #f3f4f6; }
.login-error { font-size: 0.78rem; color: #dc2626; background: rgba(220,38,38,0.08); border-radius: 6px; padding: 8px 10px; margin-top: 12px; }
.login-submit-btn {
  margin-top: 18px; padding: 11px; border-radius: 9px; border: none; cursor: pointer;
  font-weight: 700; font-size: 0.85rem; letter-spacing: 0.02em; color: #fff;
  background: linear-gradient(135deg, #0066CC, #1C26B7); transition: opacity 0.15s, transform 0.1s;
}
.login-submit-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.login-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.login-footnote { font-size: 0.68rem; color: #9ca3af; margin-top: 22px; }

/* ============================================================
   HUB PAGE
   ============================================================ */
.hub-page {
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10,10,15,0.55) 0%, rgba(10,10,15,0.25) 45%, rgba(10,10,15,0.6) 100%),
    url('assets/login_bg_gray.png') center center / cover no-repeat;
}
.hub-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 24px; }
.hub-topbar-logo { display: flex; align-items: center; background: rgba(255,255,255,0.92); border-radius: 10px; padding: 6px 12px; }
.hub-topbar-logo img { height: 26px; width: auto; display: block; }
.hub-topbar-right { display: flex; align-items: center; gap: 12px; }
.hub-user-info { display: flex; flex-direction: column; align-items: flex-end; color: #fff; }
.hub-user-name { font-size: 0.85rem; font-weight: 700; }
.hub-user-role { font-size: 0.7rem; color: rgba(255,255,255,0.75); text-transform: uppercase; letter-spacing: 0.04em; }
.hub-center {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
}
.hub-title { color: #fff; font-size: 1.5rem; font-weight: 800; letter-spacing: 0.03em; text-shadow: 0 2px 12px rgba(0,0,0,0.25); }
.hub-subtitle { color: rgba(255,255,255,0.85); font-size: 0.85rem; margin-top: 6px; margin-bottom: 36px; }
.hub-cards {
  display: grid; grid-template-columns: 1fr; gap: 22px; width: 100%; max-width: 780px;
}
@media (min-width: 640px) {
  .hub-cards { grid-template-columns: 1fr 1fr 1fr; }
}
.hub-card {
  background: rgba(255,255,255,0.96); border-radius: 20px; padding: 34px 20px;
  cursor: pointer; transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  position: relative; overflow: hidden;
}
.dark .hub-card { background: rgba(24,24,27,0.96); }
.hub-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0,0,0,0.35); }
.hub-card-icon { margin-bottom: 12px; display: flex; align-items: center; justify-content: center; }
.hub-card-icon svg { width: 44px; height: 44px; }
.hub-card-label { font-size: 1rem; font-weight: 800; color: #111; letter-spacing: 0.02em; }
.dark .hub-card-label { color: #f3f4f6; }
.hub-card-desc { font-size: 0.75rem; color: #6b7280; margin-top: 6px; }
.hub-card-builder .hub-card-icon { color: #0066CC; }
.hub-card-tracker .hub-card-icon { color: #00B050; }
.hub-card-sitelog .hub-card-icon { color: #8F237A; }
.hub-card-lock {
  display: none; font-size: 0.68rem; font-weight: 700; color: #A96515;
  margin-top: 10px; letter-spacing: 0.02em;
}
.hub-card-locked { opacity: 0.55; cursor: not-allowed; }
.hub-card-locked:hover { transform: none; box-shadow: 0 12px 30px rgba(0,0,0,0.25); }
.hub-card-locked .hub-card-lock { display: block; }

/* ============================================================
   CHANGE PASSWORD MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 100;
}
.modal-card {
  width: 100%; max-width: 380px; background: #fff; border-radius: 16px;
  padding: 28px 26px; box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.dark .modal-card { background: #18181b; }
.modal-title { font-size: 1rem; font-weight: 800; color: #111; margin-bottom: 4px; }
.dark .modal-title { color: #f3f4f6; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-cancel-btn {
  flex: 1; padding: 11px; border-radius: 9px; border: 1px solid #d1d5db;
  background: transparent; color: #6b7280; font-weight: 600; font-size: 0.85rem; cursor: pointer;
}
.dark .modal-cancel-btn { border-color: #3f3f46; color: #9ca3af; }
.modal-actions .login-submit-btn { flex: 1; margin-top: 0; }

.change-password-btn { cursor: pointer; }
.hub-change-password-btn { background: rgba(255,255,255,0.18); color: #fff; border: none; padding: 8px 14px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; transition: background 0.15s; }
.hub-change-password-btn:hover { background: rgba(255,255,255,0.3); }

/* ============================================================
   PROJECTS TABLE PAGE (Visitor / Final User)
   ============================================================ */
.pt-content { flex: 1; padding: 24px 32px 48px; position: relative; z-index: 1; }
.pt-table-wrapper { margin-top: 22px; max-width: 1000px; }
.table-wrapper { overflow-x: auto; border-radius: 12px; }
.pt-table {
  width: 100%; border-collapse: collapse; background: rgba(255,255,255,0.96);
  border-radius: 12px; overflow: hidden; font-size: 0.85rem;
}
.dark .pt-table { background: rgba(24,24,27,0.96); color: #f3f4f6; }
.pt-table thead th {
  text-align: left; padding: 12px 16px; background: rgba(0,0,0,0.04);
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280;
}
.dark .pt-table thead th { background: rgba(255,255,255,0.06); color: #9ca3af; }
.pt-table tbody td { padding: 12px 16px; border-top: 1px solid rgba(0,0,0,0.06); }
.dark .pt-table tbody td { border-top: 1px solid rgba(255,255,255,0.08); }
.pt-empty { padding: 24px; text-align: center; color: #6b7280; }
.pt-filters { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.pt-filter-btn {
  padding: 6px 14px; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
  border: 1px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.1); color: #fff; cursor: pointer;
  transition: background 0.15s;
}
.pt-filter-btn:hover { background: rgba(255,255,255,0.22); }
.pt-filter-btn.active { background: #fff; color: #111; border-color: #fff; }
.pt-legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.pt-legend-item { display: flex; align-items: center; gap: 5px; font-size: 0.7rem; color: rgba(255,255,255,0.85); font-weight: 600; }
.pt-status-label { font-size: 0.7rem; color: #6b7280; }
.dark .pt-status-label { color: #9ca3af; }
.pt-fav-star { cursor: pointer; font-size: 1rem; margin-right: 8px; user-select: none; color: #d1d5db; }
.pt-fav-star.is-fav { color: #fbbf24; }
.pt-action-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 14px; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
  border: none; cursor: pointer; margin-right: 6px; transition: opacity 0.15s; white-space: nowrap;
}
.pt-action-btn:hover { opacity: 0.85; }
.pt-view-btn { background: #0066CC; color: #fff; }
.pt-request-btn { background: #A96515; color: #fff; }
.pt-pending-badge, .pt-approved-badge {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 14px; border-radius: 999px; font-size: 0.72rem; font-weight: 700;
}
.pt-pending-badge { background: #fbbf24; color: #78350f; }
.pt-approved-badge { background: #00B050; color: #fff; border: none; cursor: pointer; transition: opacity 0.15s; }
.pt-approved-badge:hover { opacity: 0.85; }

/* ============================================================
   ACCESS REQUESTS (Admin)
   ============================================================ */
.hub-access-requests-btn {
  position: relative; background: rgba(255,255,255,0.18); color: #fff; border: none;
  padding: 8px 14px; border-radius: 999px; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
.hub-access-requests-btn:hover { background: rgba(255,255,255,0.3); }
.access-requests-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: #dc2626; color: #fff; border-radius: 999px; min-width: 18px; height: 18px;
  font-size: 0.65rem; font-weight: 800; padding: 0 5px; margin-left: 6px;
}
.access-requests-list { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.access-request-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,0.04);
}
.dark .access-request-row { background: rgba(255,255,255,0.06); }
.access-request-info { font-size: 0.8rem; }
.access-request-info strong { display: block; font-size: 0.85rem; }
.access-request-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ar-approve-btn, .ar-reject-btn { padding: 5px 10px; border-radius: 8px; font-size: 0.72rem; font-weight: 700; border: none; cursor: pointer; }
.ar-approve-btn { background: #00B050; color: #fff; }
.ar-reject-btn { background: #dc2626; color: #fff; }

/* ============================================================
   VISITOR PASSWORDLESS ACCESS
   ============================================================ */
.visitor-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 14px; color: #9ca3af; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
.visitor-divider::before, .visitor-divider::after { content: ''; flex: 1; height: 1px; background: rgba(0,0,0,0.1); }
.dark .visitor-divider::before, .dark .visitor-divider::after { background: rgba(255,255,255,0.12); }
.visitor-toggle-btn {
  width: 100%; padding: 10px; border-radius: 9px; border: 1px dashed #A96515;
  background: transparent; color: #A96515; font-weight: 700; font-size: 0.8rem; cursor: pointer;
  transition: background 0.15s;
}
.visitor-toggle-btn:hover { background: rgba(169,101,21,0.08); }
.visitor-form { margin-top: 14px; text-align: left; }
.visitor-note { font-size: 0.72rem; color: #6b7280; background: rgba(169,101,21,0.08); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; line-height: 1.4; }
.dark .visitor-note { color: #d1d5db; }
.visitor-submit-btn { background: linear-gradient(135deg, #A96515, #8F237A) !important; }

/* ============================================================
   TT2 COMPACT MODE (when 2 columns selected — keeps all fields visible)
   ============================================================ */
.tt2-compact table { font-size: 0.68rem; }
.tt2-compact td, .tt2-compact th { padding: 3px 4px !important; }
.tt2-compact select, .tt2-compact input { font-size: 0.65rem !important; padding: 2px 4px !important; min-width: 0; }
.tt2-compact .schedule-label { font-size: 0.62rem !important; }
.tt2-compact .auto-date-badge { font-size: 0.55rem !important; padding: 1px 4px !important; }

/* ============================================================
   TT2 STATUS DROPDOWN COLOR SCALE (red -> green by progress weight)
   ============================================================ */
select.status-select-0   { background-color: #fee2e2 !important; color: #991b1b !important; }
select.status-select-10,
select.status-select-25  { background-color: #fed7aa !important; color: #9a3412 !important; }
select.status-select-45,
select.status-select-55  { background-color: #fef08a !important; color: #854d0e !important; }
select.status-select-70,
select.status-select-85  { background-color: #d9f99d !important; color: #3f6212 !important; }
select.status-select-90,
select.status-select-95  { background-color: #bbf7d0 !important; color: #14532d !important; }
select.status-select-100 { background-color: #86efac !important; color: #14532d !important; font-weight: 700; }

/* ============================================================
   DASHBOARD KPI / SEMAPHORE / AREA DRILL-DOWN
   ============================================================ */
.semaphore-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.semaphore-dot-lg { width: 16px; height: 16px; box-shadow: 0 0 0 3px rgba(0,0,0,0.05); }
.sys-breakdown-row { cursor: pointer; border-radius: 8px; padding: 6px; transition: background 0.15s; }
.sys-breakdown-row:hover { background: rgba(0,0,0,0.04); }
.dark .sys-breakdown-row:hover { background: rgba(255,255,255,0.06); }
.area-detail-table { width: 100%; font-size: 0.78rem; border-collapse: collapse; margin-top: 8px; }
.area-detail-table th { text-align: left; padding: 6px 8px; background: rgba(0,0,0,0.04); font-size: 0.68rem; text-transform: uppercase; color: #6b7280; }
.dark .area-detail-table th { background: rgba(255,255,255,0.06); color: #9ca3af; }
.area-detail-table td { padding: 6px 8px; border-top: 1px solid rgba(0,0,0,0.06); }
.dark .area-detail-table td { border-top: 1px solid rgba(255,255,255,0.08); }

/* ============================================================
   BRANDING FOOTER
   ============================================================ */
.brand-footer {
  text-align: center; font-size: 0.68rem; color: #9ca3af; padding: 14px 10px;
  border-top: 1px solid rgba(0,0,0,0.06); line-height: 1.6;
}
.dark .brand-footer { color: #6b7280; border-top-color: rgba(255,255,255,0.08); }
.brand-footer .brand-name { font-weight: 700; color: #6b7280; }
.dark .brand-footer .brand-name { color: #9ca3af; }

/* ============================================================
   ASRS CONFIGURATION VIEW
   ============================================================ */
.asrs-phase-row {
  display: grid; grid-template-columns: 100px 1fr 1fr; gap: 16px; align-items: start;
  padding: 12px; border-radius: 10px; background: rgba(0,176,240,0.06);
}
.dark .asrs-phase-row { background: rgba(0,176,240,0.1); }
.asrs-phase-row .conversion-note { font-size: 0.68rem; color: #6b7280; margin-top: 4px; }
.dark .asrs-phase-row .conversion-note { color: #9ca3af; }

/* ============================================================
   ASRS TT3 — Bottom Rail / Bus Bar operational views
   ============================================================ */
.asrs-phase-block { margin-bottom: 28px; }
.asrs-phase-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 10px; color: #00B0F0; }
.asrs-table { width: 100%; }
.asrs-table td { white-space: nowrap; }
.asrs-busbar-card {
  border: 1px solid rgba(0,0,0,0.08); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px;
  background: rgba(0,176,240,0.04);
}
.dark .asrs-busbar-card { background: rgba(0,176,240,0.08); border-color: rgba(255,255,255,0.08); }
.asrs-busbar-header { font-weight: 700; font-size: 0.85rem; margin-bottom: 8px; }
.asrs-busbar-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 900px) { .asrs-busbar-grid { grid-template-columns: repeat(4, 1fr); } }
.asrs-busbar-grid label { font-size: 0.68rem; color: #6b7280; text-transform: uppercase; display: block; margin-bottom: 3px; }
.dark .asrs-busbar-grid label { color: #9ca3af; }
.asrs-busbar-grid select, .asrs-busbar-grid input { width: 100%; }

/* ============================================================
   ASRS RAIL — per-section horizontal layout
   ============================================================ */
.asrs-rail-aisle { margin-bottom: 16px; padding: 10px; border-radius: 10px; background: rgba(0,176,240,0.04); }
.dark .asrs-rail-aisle { background: rgba(0,176,240,0.08); }
.asrs-rail-aisle-header { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; font-size: 0.85rem; }
.asrs-rail-dates { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; font-size: 0.75rem; }
.asrs-rail-dates label { display: flex; flex-direction: column; gap: 2px; color: #6b7280; }
.dark .asrs-rail-dates label { color: #9ca3af; }
.asrs-rail-sections { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.asrs-rail-section-cell { flex: 0 0 auto; min-width: 64px; text-align: center; }
.asrs-rail-section-label { font-size: 0.62rem; color: #6b7280; margin-bottom: 2px; font-weight: 700; }
.dark .asrs-rail-section-label { color: #9ca3af; }
.asrs-rail-section-cell select { width: 100%; padding: 3px 2px; border-radius: 4px; border: none; text-align: center; }

/* ============================================================
   ASRS BUS BAR — VT / VKS simplified layout
   ============================================================ */
.asrs-busbar-aisle { margin-bottom: 14px; padding: 10px 12px; border-radius: 10px; background: rgba(0,176,240,0.05); }
.dark .asrs-busbar-aisle { background: rgba(0,176,240,0.09); }
.asrs-busbar-aisle-title { font-weight: 700; font-size: 0.85rem; margin-bottom: 8px; }
.asrs-vt-vks-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 800px) { .asrs-vt-vks-row { grid-template-columns: 1fr 1fr; } }
.asrs-vt-vks-item { background: rgba(255,255,255,0.6); border-radius: 8px; padding: 10px; }
.dark .asrs-vt-vks-item { background: rgba(255,255,255,0.04); }
.asrs-vt-vks-label { font-size: 0.75rem; font-weight: 600; margin-bottom: 6px; color: #374151; }
.dark .asrs-vt-vks-label { color: #d1d5db; }
.asrs-vt-vks-tag { display: inline-block; background: #00B0F0; color: #fff; font-size: 0.65rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; margin-right: 6px; }
.asrs-vt-vks-item select { width: 100%; padding: 8px; font-size: 0.9rem; border-radius: 6px; border: none; }
.asrs-vt-vks-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: 0.68rem; color: #6b7280; align-items: center; }
.dark .asrs-vt-vks-meta { color: #9ca3af; }
.asrs-vt-vks-meta label { display: flex; align-items: center; gap: 4px; }
.asrs-vt-vks-meta input[type="date"] { width: 110px; }

/* ============================================================
   ASRS RAIL — Accordion layout (per phase)
   ============================================================ */
.asrs-accordion { margin-bottom: 14px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(0,176,240,0.15); }
.asrs-accordion-header {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 10px 14px; background: rgba(0,176,240,0.08); border: none; cursor: pointer;
}
.dark .asrs-accordion-header { background: rgba(0,176,240,0.14); }
.asrs-accordion-header:hover { background: rgba(0,176,240,0.14); }
.dark .asrs-accordion-header:hover { background: rgba(0,176,240,0.2); }
.asrs-accordion-chevron { display: inline-block; transition: transform 0.15s; font-size: 0.7rem; color: #00B0F0; }
.asrs-accordion-chevron.open { transform: rotate(90deg); }
.asrs-accordion-body { padding: 14px; }

/* Smart Store v2 */
.smartstore-mini-config{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px;align-items:end;padding:8px;background:#f3f4f6;border-radius:7px;margin-top:6px;font-size:.7rem}.dark .smartstore-mini-config{background:#374151}.smartstore-mini-config input{width:100%;padding:4px;border:1px solid #d1d5db;border-radius:4px}.smartstore-tt1-head{display:flex;justify-content:space-between;background:#1C26B7;color:#fff;padding:10px 14px;border-radius:9px;margin-bottom:12px}.smartstore-category-card{border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;margin-bottom:14px}.dark .smartstore-category-card{border-color:#374151}.smartstore-category-title{display:flex;justify-content:space-between;align-items:center;background:#eef2ff;padding:10px 12px}.dark .smartstore-category-title{background:#1e1b4b}.smartstore-category-title span{display:block;font-size:.68rem;color:#6b7280}.smartstore-category-title label{display:flex;align-items:center;gap:8px;font-size:.7rem}.smartstore-tracker-table{border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;margin-bottom:12px}.dark .smartstore-tracker-table{border-color:#374151}.smartstore-tracker-table>summary{display:flex;justify-content:space-between;padding:10px 13px;background:#1C26B7;color:#fff;font-weight:800;cursor:pointer}.smartstore-busbar{padding:12px;display:grid;grid-template-columns:1fr 1fr 2fr;gap:12px;align-items:end}.smartstore-busbar>div{display:flex;align-items:center;gap:10px}.smartstore-schedule label{font-size:.68rem;color:#6b7280}.smartstore-schedule input{display:block;margin-top:3px}@media(max-width:800px){.smartstore-busbar{grid-template-columns:1fr}.smartstore-mini-config{grid-template-columns:1fr}}

/* Stacker Crane — Standard Configuration save box (TT1) */
.crane-std-config-box {
  border: 1px solid #8F237A33;
  background: rgba(143,35,122,0.06);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.dark .crane-std-config-box { background: rgba(143,35,122,0.12); border-color: #8F237A55; }

/* ===== SITELOG — presence day chips ===== */
.presence-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 5px; font-size: 0.68rem; font-weight: 800;
  color: #fff; margin-right: 4px; text-transform: uppercase; cursor: default;
}
.presence-cell {
  width: 34px; height: 30px; border-radius: 5px; font-size: 0.92rem; font-weight: 800;
  color: #fff; text-transform: uppercase; cursor: pointer; border: none; text-align: center;
  transition: transform 0.1s;
}
.presence-cell:hover { transform: scale(1.1); }
.presence-cell.presence-empty { background: #e5e7eb; color: #9ca3af; }
.dark .presence-cell.presence-empty { background: #374151; color: #6b7280; }
.presence-x, .presence-cell.presence-x { background: #EA580C; }
.presence-t, .presence-cell.presence-t { background: #0066CC; }
.presence-r, .presence-cell.presence-r { background: #6b7280; }
.presence-h, .presence-cell.presence-h { background: #8F237A; }
.presence-o, .presence-cell.presence-o { background: #00B050; }
.presence-weekend { opacity: 0.5; }
.sitelog-kpi-card {
  border-radius: 12px; padding: 14px; background: #f8fafc; border: 1px solid #e5e7eb;
}
.dark .sitelog-kpi-card { background: #1f2937; border-color: #374151; }
.sitelog-kpi-label { font-size: 0.68rem; color: #6b7280; text-transform: uppercase; font-weight: 700; letter-spacing: 0.03em; }

/* Point 2/3 (23/07): Lock/Unlock toggle -- used on Cost Summary (P0/P1) and
   Daily Rates. Purely an edit-guard (disables the paired input(s) while
   locked); the underlying value/formula is completely unaffected. */
.lock-toggle-btn { background: #e5f7ec; color: #00733e; border: 1px solid rgba(0,176,80,0.35); font-weight: 700; }
.lock-toggle-btn.is-locked { background: #fee2e2; color: #991b1b; border-color: rgba(220,38,38,0.35); }
.dark .lock-toggle-btn { background: rgba(0,176,80,0.15); color: #6ee7b7; }
.dark .lock-toggle-btn.is-locked { background: rgba(220,38,38,0.2); color: #fca5a5; }
.cost-summary-field-row { display: flex; align-items: center; gap: 6px; }
.cost-summary-field-row input[disabled] { opacity: .65; cursor: not-allowed; }
.sitelog-kpi-value { font-size: 1.3rem; font-weight: 800; margin-top: 2px; }.editable-list-table input, .editable-list-table select { font-size: 0.75rem; padding: 4px 6px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
@keyframes strongWorkflowPulse {
  0%,100% { transform:scale(1); filter:brightness(1); box-shadow:0 0 0 0 rgba(0,176,240,.2),0 0 10px rgba(0,176,240,.25); }
  45% { transform:scale(1.045); filter:brightness(1.28); box-shadow:0 0 0 9px rgba(0,176,240,.20),0 0 30px rgba(0,176,240,.75); }
}
@keyframes strongSavePulse {
  0%,100% { transform:scale(1); box-shadow:0 0 0 0 rgba(0,176,80,.2),0 0 10px rgba(0,176,80,.2); }
  50% { transform:scale(1.035); box-shadow:0 0 0 11px rgba(0,176,80,.22),0 0 32px rgba(0,176,80,.78); }
}
.workflow-selection-pulse,.workflow-action-pulse{animation:strongWorkflowPulse .85s ease-in-out infinite!important;position:relative;z-index:2}
.workflow-save-pulse{animation:strongSavePulse .9s ease-in-out infinite!important;position:relative;z-index:2}
.workflow-selection-pulse:before{content:'CONFIGURE';position:absolute;right:6px;top:-10px;background:#fff;color:#0066CC;border-radius:999px;padding:2px 6px;font-size:.52rem;font-weight:900;box-shadow:0 2px 8px rgba(0,0,0,.25)}

.tt-responsive-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:start}
.tt-responsive-grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.tt-responsive-grid.cols-2 .tt2-block,.tt-responsive-grid.cols-2 .smartstore-tracker-table{min-width:0}
.tt-responsive-grid.cols-2 .pb-table{font-size:.67rem;table-layout:fixed}
.tt-responsive-grid.cols-2 .pb-table td,.tt-responsive-grid.cols-2 .pb-table th{padding:4px 5px;white-space:normal;overflow-wrap:anywhere}
.tt-responsive-grid.cols-2 .select-input,.tt-responsive-grid.cols-2 .tt0-input{max-width:100%;width:100%;font-size:.65rem;padding:4px}
@media(max-width:1050px){.tt-responsive-grid.cols-2{grid-template-columns:1fr}}

.asrs-phase-schedule-highlight,.asrs-phase-schedule{background:linear-gradient(90deg,#dbeafe,#eff6ff)!important;border:2px solid #60a5fa!important;border-left:7px solid #0066CC!important;border-radius:9px;margin:10px 12px;box-shadow:0 3px 12px rgba(0,102,204,.12)}
.dark .asrs-phase-schedule-highlight,.dark .asrs-phase-schedule{background:linear-gradient(90deg,#172554,#1e3a5f)!important}
.asrs-activity-schedule,.asrs-busbar-shared-schedule{background:#f9fafb!important;border:1px solid #e5e7eb!important;margin:6px 12px;border-radius:7px}

.smartstore-flow-group{margin-bottom:18px}
.smartstore-flow-group[data-smart-group="INBOUND"]>.smartstore-flow-mainbar{background:#123f70}
.smartstore-flow-group[data-smart-group="OUTBOUND"]>.smartstore-flow-mainbar{background:#594018}
.smartstore-flow-group[data-smart-group="OTHER SYSTEMS"]>.smartstore-flow-mainbar{background:#374151}
.smartstore-flow-group[data-smart-group="LIGHTING"]>.smartstore-flow-mainbar{background:#745f00}
.smartstore-flow-mainbar{width:100%;display:flex;justify-content:space-between;align-items:center;border:0;cursor:pointer}
.smartstore-flow-mainbar.collapsed span{transform:rotate(-90deg)}
.smartstore-flow-group-body .smartstore-tracker-table>summary{filter:brightness(1.22);opacity:.92}
.smartstore-group-summary{display:grid;grid-template-columns:repeat(6,minmax(110px,1fr));gap:8px;padding:10px 12px;background:#eef2ff;border:1px solid #c7d2fe;border-radius:8px;margin:8px 0 10px}
.smartstore-group-summary label,.smartstore-group-summary span{font-size:.68rem;color:#6b7280}
.smartstore-group-summary b{display:block;color:#111827;margin-top:4px}
.dark .smartstore-group-summary{background:#1e1b4b;border-color:#4338ca}.dark .smartstore-group-summary b{color:#fff}
@media(max-width:1000px){.smartstore-group-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}

#ovSystemBreakdown .sys-breakdown-row>.sys-breakdown-summary{width:100%;display:grid!important;grid-template-columns:18px 22px 140px 90px 90px minmax(160px,1fr) 58px minmax(120px,220px);align-items:center;gap:12px}
#ovSystemBreakdown .sys-breakdown-row .font-bold.text-sm:last-of-type{min-width:58px!important;text-align:right!important}
@media(max-width:900px){#ovSystemBreakdown .sys-breakdown-row>.sys-breakdown-summary{grid-template-columns:18px 22px 120px 70px 70px 1fr 52px}.sys-overall-scale{display:none}}

/* SiteLog card in the main Hub */
.hub-card-sitelog {
  border-top: 5px solid #8F237A;
  background: linear-gradient(145deg, rgba(143,35,122,.08), rgba(28,38,183,.06));
}
.hub-card-sitelog .hub-card-icon {
  color: #8F237A;
}
.hub-card-sitelog:hover {
  border-color: #8F237A;
  box-shadow: 0 12px 32px rgba(143,35,122,.22);
}

/* Compact, collapsible System Breakdown */
#ovSystemBreakdown .sys-breakdown-row{display:block!important;padding:0!important;overflow:hidden;cursor:pointer}
#ovSystemBreakdown .sys-breakdown-summary{padding:12px 14px;min-height:58px}
#ovSystemBreakdown .area-detail-container{width:100%;padding:0 14px 14px;cursor:default}
#ovSystemBreakdown .area-detail-container.hidden{display:none!important}
.sys-breakdown-chevron{font-size:.7rem;color:#6b7280;text-align:center}
.area-detail-table{width:100%;table-layout:auto}
.area-detail-table th,.area-detail-table td{white-space:nowrap}

/* TT2 / TT4 responsive table grids */
.tracker-table-grid,.tt-responsive-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:start}
.tracker-table-grid-2,.tt-responsive-grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.tracker-table-grid-2 .tt2-block,.tt-responsive-grid.cols-2 .smartstore-tracker-table{min-width:0;width:100%;overflow:hidden}
.tracker-table-grid-2 .overflow-x-auto,.tt-responsive-grid.cols-2 .overflow-x-auto{overflow:visible!important}
.tracker-table-grid-2 .pb-table,.tt-responsive-grid.cols-2 .pb-table{width:100%;table-layout:fixed;font-size:.64rem}
.tracker-table-grid-2 .pb-table td,.tracker-table-grid-2 .pb-table th,
.tt-responsive-grid.cols-2 .pb-table td,.tt-responsive-grid.cols-2 .pb-table th{
  padding:4px 4px;white-space:normal!important;overflow-wrap:anywhere;vertical-align:middle
}
.tracker-table-grid-2 .select-input,.tracker-table-grid-2 .tt0-input,
.tt-responsive-grid.cols-2 .select-input,.tt-responsive-grid.cols-2 .tt0-input{
  width:100%;max-width:100%;min-width:0;font-size:.61rem;padding:4px 3px
}
.tracker-table-grid-2 .tt2-block-header,.tt-responsive-grid.cols-2 summary{font-size:.72rem}
.tracker-table-grid-2 .mini-progress{width:36px}
@media(max-width:1180px){
  .tracker-table-grid-2,.tt-responsive-grid.cols-2{grid-template-columns:1fr}
}

/* V9.3 — wide, readable 1/2-table layouts */
#trackerPage main{max-width:1540px!important}
.tracker-table-grid-2,.tt-responsive-grid.cols-2{gap:18px!important}
.tracker-table-grid-2 .tt2-block,.tt-responsive-grid.cols-2 .smartstore-tracker-table{
  min-width:0!important;width:100%!important;overflow:visible!important
}
.tracker-table-grid-2 .pb-table,.tt-responsive-grid.cols-2 .pb-table{
  table-layout:auto!important;font-size:.66rem!important
}
.tracker-table-grid-2 .pb-table td,.tracker-table-grid-2 .pb-table th,
.tt-responsive-grid.cols-2 .pb-table td,.tt-responsive-grid.cols-2 .pb-table th{
  white-space:normal!important;overflow:visible!important;word-break:normal!important;padding:5px 5px!important
}
.tracker-table-grid-2 .select-input,.tracker-table-grid-2 .tt0-input,
.tt-responsive-grid.cols-2 .select-input,.tt-responsive-grid.cols-2 .tt0-input{
  width:100%!important;min-width:0!important;max-width:100%!important;font-size:.62rem!important
}
.tracker-table-grid-2 .schedule-grid,
.tracker-table-grid-2 .tt2-schedule-grid,
.tracker-table-grid-2 .asrs-phase-schedule,
.tracker-table-grid-2 .asrs-activity-schedule,
.tt-responsive-grid.cols-2 .smartstore-group-summary,
.tt-responsive-grid.cols-2 .smartstore-schedule{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important
}
.tracker-table-grid-2 label,.tt-responsive-grid.cols-2 label{min-width:0!important}
@media(max-width:1250px){
  .tracker-table-grid-2,.tt-responsive-grid.cols-2{grid-template-columns:1fr!important}
}

/* V9.3 — unified System Breakdown */
#ovSystemBreakdown{display:flex;flex-direction:column;gap:10px}
#ovSystemBreakdown .sys-breakdown-row{
  display:block!important;padding:0!important;border-radius:10px!important;
  background:#f8fafc!important;overflow:hidden
}
.dark #ovSystemBreakdown .sys-breakdown-row{background:#1f2937!important}
#ovSystemBreakdown .sys-breakdown-summary{
  display:grid!important;
  grid-template-columns:18px 18px 150px 90px 80px 54px minmax(250px,1fr)!important;
  align-items:center!important;column-gap:12px!important;
  width:100%!important;min-height:58px;padding:11px 14px!important
}
.sys-breakdown-name{font-weight:800;font-size:.82rem;white-space:nowrap}
.sys-breakdown-units,.sys-breakdown-install{font-size:.7rem;color:#6b7280;white-space:nowrap}
.sys-breakdown-percent{font-weight:900;text-align:right;font-size:.82rem}
.sys-breakdown-scale{position:relative;height:13px;border:1px solid #cbd5e1;border-radius:999px;overflow:hidden;background:linear-gradient(90deg,#fee2e2,#fef3c7,#dcfce7)}
.sys-breakdown-scale-fill{height:100%;border-radius:999px;opacity:.9}
.sys-breakdown-scale .scale-zero,.sys-breakdown-scale .scale-hundred{position:absolute;top:-2px;font-size:.52rem;font-weight:900;color:#334155;line-height:15px}
.sys-breakdown-scale .scale-zero{left:5px}.sys-breakdown-scale .scale-hundred{right:5px}
#ovSystemBreakdown .sys-breakdown-bar,#ovSystemBreakdown .sys-overall-scale{display:none!important}
#ovSystemBreakdown .area-detail-container{padding:0 14px 14px!important}
.area-detail-overall-only{width:100%;max-width:760px}
.area-detail-overall-only th,.area-detail-overall-only td{padding:7px 10px}
.detail-overall-wrap{display:grid;grid-template-columns:48px minmax(180px,1fr);gap:10px;align-items:center}
.detail-overall-bar{height:9px;background:#e5e7eb;border-radius:999px;overflow:hidden}
.detail-overall-bar span{display:block;height:100%;border-radius:999px}
@media(max-width:900px){
  #ovSystemBreakdown .sys-breakdown-summary{
    grid-template-columns:16px 16px 115px 60px 65px 44px minmax(120px,1fr)!important;
    column-gap:7px!important;padding:9px 8px!important
  }
}

/* V9.4 — unified HUB module cards */
.hub-cards{grid-template-columns:repeat(3,minmax(0,1fr))!important;max-width:1180px!important}
.hub-card{position:relative;overflow:hidden;background:rgba(255,255,255,.94)!important;opacity:1!important;border-top:6px solid transparent!important;backdrop-filter:none!important}
.hub-card-builder{border-top-color:#0066CC!important}
.hub-card-tracker{border-top-color:#00B050!important}
.hub-card-sitelog{border-top-color:#8F237A!important;background:rgba(255,255,255,.94)!important}
.hub-card-builder .hub-card-icon{color:#0066CC!important}
.hub-card-tracker .hub-card-icon{color:#00B050!important}
.hub-card-sitelog .hub-card-icon{color:#8F237A!important}
.hub-card:hover{transform:translateY(-4px);filter:none!important;opacity:1!important}
@media(max-width:900px){.hub-cards{grid-template-columns:1fr!important}}

#sitelogListPage.hidden,#sitelogPage.hidden,#projectsTablePage.hidden,#builderPage.hidden,#trackerPage.hidden,#hubPage.hidden,#loginPage.hidden{display:none!important}

/* V9.4 — Active Projects table */
#projectsTablePage .pt-content{max-width:1540px!important;width:calc(100% - 34px)!important}
#projectsTablePage .pt-table-wrapper{overflow-x:auto!important}
#projectsTablePage .pt-table{min-width:1380px!important;width:100%!important;table-layout:auto!important}
#projectsTablePage .pt-table th,#projectsTablePage .pt-table td{white-space:nowrap!important}
#projectsTablePage .pt-table th:nth-child(1),#projectsTablePage .pt-table td:nth-child(1){min-width:125px}
#projectsTablePage .pt-table th:nth-child(2),#projectsTablePage .pt-table td:nth-child(2){min-width:230px}
#projectsTablePage .pt-table th:nth-child(3),#projectsTablePage .pt-table td:nth-child(3){min-width:300px}
#projectsTablePage .pt-status-label{display:inline!important;white-space:nowrap!important}

/* V9.4 — Smart Store group palette */
.smart-group-inbound>.smartstore-flow-mainbar{background:#123f70!important}
.smart-group-inbound .smartstore-tracker-table>summary{background:#5c94c9!important;color:#fff}
.smart-group-outbound>.smartstore-flow-mainbar{background:#146c43!important}
.smart-group-outbound .smartstore-tracker-table>summary{background:#69ad88!important;color:#fff}
.smart-group-lighting>.smartstore-flow-mainbar{background:#8a6b00!important}
.smart-group-lighting .smartstore-tracker-table>summary{background:#d8b94f!important;color:#282828}
.smart-group-other-systems>.smartstore-flow-mainbar{background:#4b5563!important}
.smart-group-other-systems .smartstore-tracker-table>summary{background:#9ca3af!important;color:#111827}
.smartstore-flow-mainbar{width:100%;display:flex;justify-content:space-between;align-items:center;padding:13px 15px;border:0;color:#fff;font-weight:900}
.smartstore-group-summary{grid-template-columns:repeat(9,minmax(95px,1fr))!important}
.smartstore-table-schedule{display:grid;grid-template-columns:repeat(7,minmax(92px,1fr));gap:7px;padding:9px;background:#f8fafc;border-bottom:1px solid #e5e7eb}
.smartstore-table-schedule label,.smartstore-table-schedule span{font-size:.65rem;color:#6b7280}
.smartstore-table-schedule small{display:block}.smartstore-table-schedule b{display:block;color:#111827;margin-top:3px}
.dark .smartstore-table-schedule{background:#1f2937}.dark .smartstore-table-schedule b{color:#fff}
.tt-responsive-grid.cols-2 .smartstore-table-schedule{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.tt-responsive-grid.cols-2 .smartstore-tracker-table{overflow:hidden!important}
.tt-responsive-grid.cols-2 .pb-table{table-layout:fixed!important}
.tt-responsive-grid.cols-2 .pb-table td:nth-child(1){width:34%}
.tt-responsive-grid.cols-2 .pb-table td:nth-child(2),.tt-responsive-grid.cols-2 .pb-table td:nth-child(3){width:33%}
@media(max-width:1150px){.smartstore-group-summary{grid-template-columns:repeat(3,minmax(0,1fr))!important}.smartstore-table-schedule{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* V9.5 — slightly narrower HUB cards */
.hub-cards{max-width:1040px!important;gap:24px!important}
.hub-card{min-height:178px!important;padding:24px 20px!important}

/* V9.5 — Active Projects fills available width without horizontal scroll */
#projectsTablePage .pt-content{max-width:none!important;width:calc(100% - 28px)!important;padding-left:14px!important;padding-right:14px!important}

#projectsTablePage .pt-action-btn,#projectsTablePage .pt-approved-badge{padding:5px 8px!important;font-size:.65rem!important}

/* V9.5 — Smart Store multi-select, dropdown scale and PLC */
.smart-master-metrics{display:flex;align-items:center;gap:7px}
.smart-master-metrics i{font-style:normal;padding:3px 8px;border-radius:999px;font-size:.62rem;font-weight:900}
.smart-install-chip{background:rgba(255,255,255,.22);color:#fff}
.smart-plc-chip{background:#5B21B6;color:#fff}
.smart-summary-title{grid-column:1/-1;font-size:.65rem;font-weight:900;letter-spacing:.08em}
.smart-install-summary{border-left:5px solid #00B050!important;background:#ecfdf5!important}
.smart-plc-summary{border-left:5px solid #7C3AED!important;background:#f5f3ff!important}
.dark .smart-install-summary{background:#052e1b!important}.dark .smart-plc-summary{background:#2e1065!important}
.smart-select-col{width:30px!important;text-align:center!important}
.smart-colored-select{font-weight:700!important;border-color:rgba(255,255,255,.35)!important}
.smart-colored-select option{background:#fff;color:#111}
.smart-plc-progress-select{background:#7C3AED!important;color:#fff!important;font-weight:800}
.smartstore-activity-table{table-layout:auto!important}
.tt-responsive-grid.cols-2 .smartstore-activity-table{font-size:.64rem!important}
.tt-responsive-grid.cols-2 .smartstore-table-schedule{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.tt-responsive-grid.cols-2 .smart-summary-title{grid-column:1/-1}

/* V9.6 — Active Projects full-width table */
#projectsTablePage .pt-content{
  width:100%!important;
  max-width:100%!important;
  padding-left:12px!important;
  padding-right:12px!important;
  box-sizing:border-box!important;
}
#projectsTablePage .pt-table-wrapper{
  width:100%!important;
  max-width:100%!important;
  overflow:visible!important;
  display:block!important;
}
#projectsTablePage .pt-table{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  table-layout:fixed!important;
}
#projectsTablePage .pt-table th,
#projectsTablePage .pt-table td{
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:nowrap!important;
}

/* Active SiteLogs matches Active Projects and fills the full viewport. */
#sitelogListPage .pt-content{width:100%!important;max-width:100%!important;padding-left:12px!important;padding-right:12px!important;box-sizing:border-box!important}
#sitelogListPage .pt-table-wrapper{width:100%!important;max-width:100%!important;overflow:visible!important;display:block!important}
#sitelogListPage .pt-table{width:100%!important;max-width:none!important;min-width:0!important;table-layout:fixed!important}
#sitelogListPage .pt-table th,#sitelogListPage .pt-table td{white-space:nowrap!important;padding:8px 7px!important;font-size:.72rem!important;overflow:visible!important;text-overflow:clip!important}
#sitelogListPage .pt-table th:nth-child(1),#sitelogListPage .pt-table td:nth-child(1){width:7%!important}
#sitelogListPage .pt-table th:nth-child(2),#sitelogListPage .pt-table td:nth-child(2){width:13%!important}
#sitelogListPage .pt-table th:nth-child(3),#sitelogListPage .pt-table td:nth-child(3),#sitelogListPage .pt-table th:nth-child(4),#sitelogListPage .pt-table td:nth-child(4){width:9%!important}
#sitelogListPage .pt-table th:nth-child(5),#sitelogListPage .pt-table td:nth-child(5){width:16%!important}
#sitelogListPage .pt-table th:nth-child(6),#sitelogListPage .pt-table td:nth-child(6),#sitelogListPage .pt-table th:nth-child(7),#sitelogListPage .pt-table td:nth-child(7){width:5%!important;text-align:center!important}
#sitelogListPage .pt-table th:nth-child(8),#sitelogListPage .pt-table td:nth-child(8){width:7%!important}
#sitelogListPage .pt-table th:nth-child(9),#sitelogListPage .pt-table td:nth-child(9){width:10%!important}
#sitelogListPage .pt-table th:nth-child(10),#sitelogListPage .pt-table td:nth-child(10){width:10%!important}
#sitelogListPage .pt-table th:nth-child(11),#sitelogListPage .pt-table td:nth-child(11){width:8%!important}
#sitelogListPage .pt-action-btn{padding:5px 8px!important;font-size:.65rem!important}
#sitelogListPage .pt-status-label{display:inline!important;white-space:nowrap!important}
#sitelogListPage .sl-final-user-access{display:flex!important;align-items:center!important;gap:4px!important;width:100%!important}
#sitelogListPage .sl-final-user-access input{min-width:0!important;flex:1 1 auto!important;height:24px!important;padding:2px 5px!important;border:1px solid #cbd5e1!important;border-radius:4px!important;background:#fff!important;color:#111827!important;font-size:.64rem!important}
#sitelogListPage .sl-final-user-access button{flex:0 0 auto!important;height:24px!important;padding:0 6px!important;border:1px solid #0066CC!important;border-radius:4px!important;background:#0066CC!important;color:#fff!important;font-size:.58rem!important;font-weight:700!important;white-space:nowrap!important}
#sitelogPage.sitelog-readonly main input:disabled,#sitelogPage.sitelog-readonly main select:disabled,#sitelogPage.sitelog-readonly main textarea:disabled{opacity:1!important;cursor:default!important;color:inherit!important}
#sitelogPage.sitelog-readonly main button:disabled{cursor:default!important;pointer-events:none!important}
#builderPage.builder-readonly main input:disabled,#builderPage.builder-readonly main select:disabled,#builderPage.builder-readonly main textarea:disabled{opacity:1!important;cursor:default!important;color:inherit!important}
#builderPage.builder-readonly main button:disabled{cursor:default!important;pointer-events:none!important}
.access-temp-password-row{display:grid!important;grid-template-columns:auto minmax(90px,1fr) auto auto!important;align-items:center!important;gap:5px!important;padding:5px!important;border:1px solid #86efac!important;border-radius:5px!important;background:#f0fdf4!important}
.access-temp-password-row.hidden{display:none!important}.access-temp-password-row span{font-size:.58rem!important;font-weight:700!important;color:#166534!important;white-space:nowrap!important}.access-temp-password-row input{height:24px!important;min-width:0!important;padding:2px 5px!important;border:1px solid #86efac!important;border-radius:4px!important;background:#fff!important;color:#111827!important;font-family:monospace!important;font-size:.7rem!important;font-weight:800!important}.access-temp-password-row button{height:24px!important;padding:0 8px!important;border:1px solid #16a34a!important;border-radius:4px!important;background:#16a34a!important;color:#fff!important;font-size:.6rem!important;font-weight:700!important}
.access-temp-password-row button:disabled{background:#cbd5e1!important;border-color:#cbd5e1!important;color:#64748b!important;cursor:not-allowed!important}
#projectsTablePage .pt-table-wrapper{width:100%!important;max-width:100%!important;overflow:visible!important;display:block!important}
#projectsTablePage .pt-table{width:100%!important;max-width:none!important;min-width:0!important;table-layout:fixed!important}
#projectsTablePage .pt-table th:nth-child(1),#projectsTablePage .pt-table td:nth-child(1){width:8%!important}
#projectsTablePage .pt-table th:nth-child(2),#projectsTablePage .pt-table td:nth-child(2){width:9%!important}
#projectsTablePage .pt-table th:nth-child(3),#projectsTablePage .pt-table td:nth-child(3){width:14%!important}
#projectsTablePage .pt-table th:nth-child(4),#projectsTablePage .pt-table td:nth-child(4){width:7%!important}
#projectsTablePage .pt-table th:nth-child(5),#projectsTablePage .pt-table td:nth-child(5){width:7%!important}
#projectsTablePage .pt-table th:nth-child(6),#projectsTablePage .pt-table td:nth-child(6){width:5%!important}
#projectsTablePage .pt-table th:nth-child(7),#projectsTablePage .pt-table td:nth-child(7){width:5%!important}
#projectsTablePage .pt-table th:nth-child(8),#projectsTablePage .pt-table td:nth-child(8){width:7%!important}
#projectsTablePage .pt-table th:nth-child(9),#projectsTablePage .pt-table td:nth-child(9){width:10%!important}
#projectsTablePage .pt-table th:nth-child(10),#projectsTablePage .pt-table td:nth-child(10){width:10%!important}
#projectsTablePage .pt-table th:nth-child(11),#projectsTablePage .pt-table td:nth-child(11){width:10%!important;white-space:normal!important}
#projectsTablePage .pt-table th:nth-child(12),#projectsTablePage .pt-table td:nth-child(12){width:8%!important}

/* V9.6 — Smart Store typography */
.smartstore-flow-mainbar,
.smartstore-group-summary,
.smartstore-table-schedule,
.smartstore-tracker-table,
.smartstore-activity-table{
  font-family:Arial,Helvetica,sans-serif!important;
}
.smartstore-flow-mainbar{font-weight:700!important}
.smartstore-flow-mainbar span,.smartstore-flow-mainbar strong{font-weight:700!important}
.smartstore-group-summary,
.smartstore-table-schedule{font-weight:400!important}
.smartstore-group-summary b,
.smartstore-table-schedule b{font-weight:600!important}
.smart-summary-title{font-weight:700!important}
.smartstore-tracker-table>summary,
.smartstore-tracker-table>summary span,
.smartstore-tracker-table>summary strong{font-weight:600!important}
.smartstore-activity-table td,
.smartstore-activity-table th{font-weight:400!important}
.smartstore-activity-table td strong{font-weight:600!important}
.smartstore-activity-table .select-input,
.smartstore-table-schedule .tt0-input,
.smartstore-group-summary .tt0-input{font-weight:400!important}

/* V9.6 — TT2 adaptive two-column layout */
#trackerPage main{max-width:1680px!important;width:100%!important}
.tracker-table-grid-2{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px!important;
  align-items:start!important;
}
.tracker-table-grid-2 .tt2-block{
  width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
}
.tracker-table-grid-2 .overflow-x-auto{
  overflow:visible!important;
}
.tracker-table-grid-2 .pb-table{
  width:100%!important;
  table-layout:fixed!important;
  font-size:.64rem!important;
}
.tracker-table-grid-2 .pb-table td,
.tracker-table-grid-2 .pb-table th{
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  padding:4px 4px!important;
  vertical-align:middle!important;
}
.tracker-table-grid-2 .pb-table td:nth-child(1){width:5%!important}
.tracker-table-grid-2 .pb-table td:nth-child(2){width:25%!important}
.tracker-table-grid-2 .pb-table td:nth-child(3){width:24%!important}
.tracker-table-grid-2 .pb-table td:nth-child(4){width:7%!important}
.tracker-table-grid-2 .pb-table td:nth-child(5){width:24%!important}
.tracker-table-grid-2 .pb-table td:nth-child(6){width:7%!important}
.tracker-table-grid-2 .select-input,
.tracker-table-grid-2 .tt0-input{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  font-size:.61rem!important;
  padding:4px 3px!important;
  box-sizing:border-box!important;
}
.tracker-table-grid-2 .schedule-row td{
  white-space:normal!important;
}
.tracker-table-grid-2 .schedule-label{
  font-size:.61rem!important;
  line-height:1.15!important;
}
.tracker-table-grid-2 .schedule-value{
  font-size:.61rem!important;
}
.tracker-table-grid-2 .cat-row td{
  font-size:.62rem!important;
  letter-spacing:.03em!important;
}
@media(max-width:1280px){
  .tracker-table-grid-2{grid-template-columns:1fr!important}
}

.delay-positive,
[data-delay-positive="true"]{color:#dc2626!important;font-weight:700!important}

/* V9.7 — HUB modules resized */
.hub-cards{
  max-width:960px!important;
  gap:24px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
.hub-card{
  min-height:250px!important;
  max-height:250px!important;
  padding:28px 20px!important;
  border-radius:24px!important;
}
.hub-card-icon svg{width:62px!important;height:62px!important}
.hub-card-label{font-size:1.12rem!important}
.hub-card-desc{font-size:.78rem!important;max-width:220px!important;margin-left:auto!important;margin-right:auto!important}

/* V9.7 — Active Projects filters and legend */
#projectsTablePage .pt-filters{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  flex-wrap:nowrap!important;
  width:max-content!important;
  max-width:100%!important;
  padding:5px 0!important;
}
#projectsTablePage .pt-filter-btn{
  padding:7px 13px!important;
  font-size:.68rem!important;
  white-space:nowrap!important;
}
.pt-legend-under-filters{
  margin:6px 0 10px 0!important;
  padding:6px 10px!important;
  width:max-content!important;
  background:rgba(17,24,39,.35)!important;
  border-radius:7px!important;
}

/* V9.7 — unified TT2 / TT3 / TT4 visual standard */
.tt2-block .cat-row:first-of-type td,
.smart-install-summary,
.asrs-activity-schedule,
.asrs-busbar-shared-schedule{
  border-left:5px solid #00B050!important;
  background:#ecfdf5!important;
}
.tt2-block .cat-row:nth-of-type(2) td,
.smart-plc-summary{
  border-left:5px solid #7C3AED!important;
  background:#f5f3ff!important;
}
.dark .tt2-block .cat-row:first-of-type td,
.dark .smart-install-summary,
.dark .asrs-activity-schedule,
.dark .asrs-busbar-shared-schedule{background:#052e1b!important}
.dark .tt2-block .cat-row:nth-of-type(2) td,
.dark .smart-plc-summary{background:#2e1065!important}
.asrs-rail-aisle,.asrs-busbar-combined{
  border:1px solid #93c5fd!important;
  box-shadow:0 2px 8px rgba(0,102,204,.08)!important;
}
.asrs-rail-aisle:nth-child(even),.asrs-busbar-combined:nth-child(even){
  border-color:#86efac!important;
}
.asrs-rail-aisle-header,.asrs-busbar-aisle-title{
  background:#dbeafe!important;
  color:#1e3a8a!important;
}
.asrs-rail-aisle:nth-child(even) .asrs-rail-aisle-header,
.asrs-busbar-combined:nth-child(even) .asrs-busbar-aisle-title{
  background:#dcfce7!important;
  color:#14532d!important;
}
.asrs-phase-schedule,.asrs-phase-schedule-highlight{
  background:#e0e7ff!important;
  border-left-color:#4338ca!important;
}

/* V9.7 — System Breakdown slightly larger */
#ovSystemBreakdown .sys-breakdown-summary{
  min-height:70px!important;
  padding:15px 16px!important;
}
.sys-breakdown-name{font-size:.92rem!important}
.sys-breakdown-units,.sys-breakdown-install{font-size:.78rem!important}
.sys-breakdown-percent{font-size:.94rem!important}
.sys-breakdown-scale{height:15px!important}

/* V9.7 — all TT2 tables adapt cleanly in two-column mode */
.tracker-table-grid-2{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:18px!important;
}
.tracker-table-grid-2 .tt2-block{min-width:0!important;overflow:hidden!important}
.tracker-table-grid-2 .pb-table{table-layout:fixed!important;width:100%!important}
.tracker-table-grid-2 .pb-table td,
.tracker-table-grid-2 .pb-table th{
  padding:4px 3px!important;
  font-size:.61rem!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
.tracker-table-grid-2 .select-input,
.tracker-table-grid-2 .tt0-input{
  min-width:0!important;
  max-width:100%!important;
  width:100%!important;
  font-size:.59rem!important;
  padding:3px!important;
}
.tracker-table-grid-2 .schedule-row td{height:auto!important;min-height:32px!important}
.tracker-table-grid-2 .cat-row td{
  background:#ecfdf5!important;
  border-left:5px solid #00B050!important;
}
.tracker-table-grid-2 .cat-row:nth-of-type(2) td{
  background:#f5f3ff!important;
  border-left-color:#7C3AED!important;
}
@media(max-width:1320px){
  .tracker-table-grid-2{grid-template-columns:1fr!important}
}

/* V9.8 — elegant responsive HUB modules */
.hub-cards{max-width:920px!important;gap:22px!important}
.hub-card{min-height:205px!important;max-height:205px!important;padding:22px 18px!important;border-radius:20px!important;transition:transform .22s ease,box-shadow .22s ease!important}
.hub-card:hover{transform:translateY(-6px) scale(1.015)!important;box-shadow:0 20px 44px rgba(15,23,42,.24)!important}
.hub-card-icon svg{width:52px!important;height:52px!important}
.hub-card-label{font-size:1.02rem!important;margin-top:10px!important}
.hub-card-desc{font-size:.72rem!important;line-height:1.35!important}
@media(max-width:980px){.hub-cards{max-width:700px!important}.hub-card{min-height:190px!important;max-height:none!important}}

/* Smart Store horizontal master bars */
.smartstore-flow-mainbar{
  writing-mode:horizontal-tb!important;
  text-orientation:mixed!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:space-between!important;
  width:100%!important;
  min-height:56px!important;
  padding:12px 16px!important;
  white-space:nowrap!important;
}
.smartstore-flow-mainbar>span{writing-mode:horizontal-tb!important;transform:none!important;position:static!important}
.smart-master-metrics{display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important}
.smartstore-flow-mainbar.collapsed{min-height:56px!important}
.smartstore-flow-mainbar.collapsed .smart-master-metrics{display:flex!important}

/* Editable automatic dates */
.editable-actual-date{border:0;background:transparent;color:inherit;font:inherit;font-weight:600;cursor:pointer;padding:0;border-bottom:1px dashed currentColor}
.editable-actual-date:hover{color:#0066CC}

/* Smart TT0 naming help */
.smartstore-tt0-help{margin:12px 0;padding:12px 14px;border-left:5px solid #1C26B7;background:#eef2ff;border-radius:8px;font-size:.75rem;line-height:1.55}
.smartstore-tt0-help strong{display:block;margin-bottom:5px;color:#1C26B7}
.smartstore-tt0-help code{background:#fff;border:1px solid #c7d2fe;border-radius:4px;padding:1px 4px;color:#312e81}

/* V9.9 — unified schedule traffic lights */
.schedule-semaphore{display:inline-flex;align-items:center;gap:5px;margin-left:10px;padding:3px 8px;border-radius:999px;font-size:.62rem;font-weight:800;color:#fff;vertical-align:middle}
.schedule-semaphore i{width:8px;height:8px;border-radius:50%;background:currentColor}
.schedule-green{background:#15803d}.schedule-yellow{background:#d97706}.schedule-red{background:#dc2626}.schedule-gray{background:#6b7280}
.asrs-schedule-heading{grid-column:1/-1;font-weight:900;font-size:.7rem;letter-spacing:.06em}
.smart-summary-title{display:flex;align-items:center;justify-content:space-between}

/* Sitelog resources and presence */
.sl-resources-table{width:100%;table-layout:fixed}
.sl-resources-table th,.sl-resources-table td{padding:7px}
#slview-presence .table-wrapper{overflow-x:auto}
#presenceTable{min-width:1450px;width:max-content}
#presenceTable .pres-day-head{min-width:54px;text-align:center;font-size:.62rem}
#presenceTable td{padding:3px;text-align:center}
.presence-activity-row td{background:#eef2ff!important;color:#312e81}
.activity-active-day{background:#bfdbfe!important}
.project-sitelog-link{margin-left:8px;border:0;border-radius:999px;padding:3px 8px;background:#8F237A;color:#fff;font-size:.6rem;font-weight:800;cursor:pointer}

/* V10 — Presence uses the full viewport */
#sitelogPage main{max-width:none!important;width:100%!important;padding-left:8px!important;padding-right:8px!important}
#slview-presence>section{padding:10px!important;border-radius:8px!important}
.presence-toolbar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;margin-bottom:8px}
.presence-toolbar-left{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.presence-toolbar-left label{display:flex;align-items:center;gap:5px;font-size:.68rem}
.presence-week-nav{display:flex;align-items:center;justify-content:center;gap:7px}
.presence-legend{justify-self:end;display:flex;gap:6px;flex-wrap:wrap}
.presence-table-stage{width:100%;overflow-y:auto!important;overflow-x:auto!important;max-height:68vh;border:1px solid rgba(148,163,184,.28);border-radius:8px}
#presenceTable thead{position:sticky;top:0;z-index:20}
#presenceTable thead th,#presenceTable thead td{position:sticky;top:0;z-index:20}
#presenceTable{width:auto!important;min-width:100%!important;table-layout:fixed!important;border-collapse:collapse}
#presenceTable th,#presenceTable td{padding:1px!important;border:1px solid rgba(148,163,184,.28);overflow:hidden}
#presenceTable .presence-control-head,#presenceTable .presence-row-controls{width:82px!important;overflow:visible!important}
#presenceTable .presence-name-head,#presenceTable .presence-label-cell{width:150px!important;text-align:left!important}
#presenceTable .presence-skill-head,#presenceTable .presence-skill-cell{width:42px!important;text-align:center!important}
.presence-week-header{height:26px;font-size:.65rem;font-weight:800;text-align:center!important;border-bottom:2px solid rgba(30,41,59,.3)!important}
.presence-week-a{background:rgba(219,234,254,.58)!important}
.presence-week-b{background:rgba(220,252,231,.58)!important}
.pres-day-head{height:68px!important;text-align:center!important;vertical-align:bottom!important}
.pres-day-vertical{
  display:inline-block;
  writing-mode:vertical-rl;
  transform:rotate(180deg);
  white-space:nowrap;
  font-size:.55rem;
  font-weight:600;
  line-height:1;
}
#presenceTable .presence-cell{
  width:100%!important;
  height:29px!important;
  min-width:0!important;
  padding:0!important;
  border-radius:3px!important;
  font-size:1.05rem!important;
  font-weight:800!important;
}
.presence-row-controls{white-space:nowrap!important;text-align:center!important}
.presence-row-controls button{width:15px;height:20px;border:0;border-radius:3px;margin:0 1px;background:#e2e8f0;color:#334155;font-size:.65rem;line-height:20px}
.presence-row-controls button:nth-child(2){background:#fecaca;color:#991b1b}
.presence-label-cell{padding:2px 4px!important;font-size:.63rem!important;white-space:nowrap!important;text-overflow:ellipsis}
.presence-label-cell small{display:block;font-size:.5rem;color:#64748b}
.presence-activity-name{width:100%;border:0;background:transparent;font-size:.62rem;font-weight:650}
.presence-skill-cell{font-size:.56rem;font-weight:750}
.presence-activity-row .presence-label-cell{background:#e0e7ff!important;color:#312e81}
.activity-active-day{box-shadow:inset 0 0 0 3px #000;background:#bfdbfe!important}
@media(max-width:1150px){
  .presence-toolbar{grid-template-columns:1fr}
  .presence-week-nav,.presence-legend{justify-self:center}
  #presenceTable .presence-name-head,#presenceTable .presence-label-cell{width:110px!important}
  #presenceTable .presence-control-head,#presenceTable .presence-row-controls{width:42px!important}
}

/* V10.1 — unified Installation / PLC style */
.tt2-block .cat-row:first-of-type td,
.smart-install-summary,
.smartstore-table-schedule.smart-install-summary{
  background:#ecfdf5!important;border-left:6px solid #16a34a!important;color:#14532d!important
}
.tt2-block .cat-row:nth-of-type(2) td,
.smart-plc-summary,
.smartstore-table-schedule.smart-plc-summary{
  background:#f5f3ff!important;border-left:6px solid #7c3aed!important;color:#4c1d95!important
}
.dark .tt2-block .cat-row:first-of-type td,
.dark .smart-install-summary,
.dark .smartstore-table-schedule.smart-install-summary{background:#052e1b!important;color:#bbf7d0!important}
.dark .tt2-block .cat-row:nth-of-type(2) td,
.dark .smart-plc-summary,
.dark .smartstore-table-schedule.smart-plc-summary{background:#2e1065!important;color:#ddd6fe!important}

/* Smart Store TT2/TT4: dropdown activity table first, individual dates below */
.smartstore-tracker-table[open]{display:flex!important;flex-direction:column!important}
.smartstore-tracker-table>summary{order:1!important}
.smartstore-tracker-table>.overflow-x-auto{order:2!important}
.smartstore-tracker-table>.smart-install-summary{order:3!important}
.smartstore-tracker-table>.smart-plc-summary{order:4!important}
.smartstore-tracker-table .smartstore-table-schedule{margin:0!important;border-top:1px solid rgba(148,163,184,.35)!important}

/* Project Health status: dot + text only */
.schedule-health-status{display:inline-flex!important;align-items:center!important;gap:5px!important;margin-left:9px!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;font-size:.64rem!important;font-weight:700!important}
.schedule-health-status i{display:inline-block!important;width:9px!important;height:9px!important;min-width:9px!important;border-radius:50%!important}
.schedule-health-status.schedule-green{color:#15803d!important}.schedule-health-status.schedule-green i{background:#16a34a!important}
.schedule-health-status.schedule-yellow{color:#b45309!important}.schedule-health-status.schedule-yellow i{background:#f59e0b!important}
.schedule-health-status.schedule-red{color:#dc2626!important}.schedule-health-status.schedule-red i{background:#ef4444!important}
.schedule-health-status.schedule-gray{color:#6b7280!important}.schedule-health-status.schedule-gray i{background:#9ca3af!important}
.schedule-semaphore{background:transparent!important;border:0!important;box-shadow:none!important}

/* SiteLog Resources start/finish dates */
.sl-resources-table{min-width:1280px!important}
.sl-resources-table th:nth-child(6),.sl-resources-table th:nth-child(7),
.sl-resources-table td:nth-child(6),.sl-resources-table td:nth-child(7){width:135px!important}
.sl-resources-table input[type="date"]{min-width:125px!important}

/* V10.2 — unified TT2 / TT3 / TT4 date panels */
.smartstore-table-schedule,.smartstore-group-summary,.asrs-phase-schedule,.asrs-activity-schedule,.asrs-busbar-shared-schedule{
  display:grid!important;grid-template-columns:minmax(130px,1.2fr) minmax(130px,1.2fr) repeat(3,minmax(85px,.7fr))!important;
  align-items:stretch!important;gap:0!important;padding:0!important;border:1px solid #d1d5db!important;border-left-width:6px!important;overflow:hidden!important
}
.smartstore-table-schedule>.smart-summary-title,.smartstore-group-summary>.smart-summary-title,.asrs-schedule-heading{
  grid-column:1/-1!important;padding:8px 10px!important;border-bottom:1px solid rgba(148,163,184,.4)!important;font-size:.72rem!important;font-weight:800!important
}
.smartstore-table-schedule>label,.smartstore-table-schedule>span,.smartstore-group-summary>label,.smartstore-group-summary>span,
.asrs-phase-schedule>label,.asrs-phase-schedule>span,.asrs-activity-schedule>label,.asrs-activity-schedule>span,
.asrs-busbar-shared-schedule>label,.asrs-busbar-shared-schedule>span{
  min-height:48px!important;padding:7px 9px!important;margin:0!important;border-right:1px solid rgba(148,163,184,.28)!important;border-bottom:1px solid rgba(148,163,184,.28)!important;
  display:flex!important;flex-direction:column!important;justify-content:center!important;font-size:.64rem!important
}
.smartstore-table-schedule input,.smartstore-group-summary input,.asrs-phase-schedule input,.asrs-activity-schedule input,.asrs-busbar-shared-schedule input{width:100%!important}
.smart-install-summary,.asrs-phase-schedule,.asrs-activity-schedule,.asrs-busbar-shared-schedule{background:#ecfdf5!important;border-left-color:#16a34a!important}
.smart-plc-summary{background:#f5f3ff!important;border-left-color:#7c3aed!important}
.smartstore-tracker-table[open]{display:flex!important;flex-direction:column!important}
.smartstore-tracker-table>summary{order:1!important}.smartstore-tracker-table>.overflow-x-auto{order:2!important}.smartstore-tracker-table>.smart-install-summary{order:3!important}.smartstore-tracker-table>.smart-plc-summary{order:4!important}

/* Presence 1–10 weeks */
#sitelogPage main{max-width:none!important;width:100%!important;padding-left:5px!important;padding-right:5px!important}
.presence-toolbar{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important}
.presence-toolbar-right{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}
.presence-code-help{display:inline-flex;cursor:help}
.presence-table-stage{width:100%!important;overflow-y:auto!important;overflow-x:auto!important;max-height:68vh!important}
#presenceTable{width:auto!important;min-width:100%!important;table-layout:fixed!important;font-size:.55rem!important}
#presenceTable th,#presenceTable td{padding:1px!important;overflow:hidden!important}
#presenceTable .presence-control-head,#presenceTable .presence-row-controls{width:82px!important;overflow:visible!important}
#presenceTable .presence-name-head,#presenceTable .presence-label-cell{width:var(--presence-name-ch,18ch)!important;min-width:var(--presence-name-ch,18ch)!important;max-width:var(--presence-name-ch,18ch)!important}
#presenceTable .presence-skill-head,#presenceTable .presence-skill-cell{width:34px!important}
#presenceTable .presence-total-presence-head,#presenceTable .presence-total-presence-cell{width:48px!important;text-align:center!important}
.pres-detail-col{width:72px!important;font-size:.5rem!important}.pres-total-col{width:58px!important;font-size:.48rem!important;text-align:center!important}
#presenceTable .pres-day-head{height:76px!important;width:auto!important}.pres-day-vertical{font-size:.47rem!important}
.presence-flags{display:block;font-size:.58rem;line-height:1;text-align:center;margin-bottom:2px}
#presenceTable .presence-cell{height:20px!important;font-size:.5rem!important;border-radius:2px!important}
.presence-saturday{background:#f3f4f6!important}.presence-sunday{background:#fef2f2!important}
.presence-holiday-us{}.presence-holiday-mx{}
.presence-row-controls{white-space:nowrap!important}.presence-row-controls button{width:18px!important;height:20px!important;padding:0!important;margin:0 1px!important;font-size:.48rem!important}
.presence-drag-handle{display:inline-flex;width:14px;height:20px;align-items:center;justify-content:center;cursor:grab;color:#64748b}
.presence-row-dragging{opacity:.45}.presence-row-drop{outline:2px solid #0066cc!important}
#presenceTable .pres-detail-col select{width:100%;font-size:.48rem;padding:1px;border:1px solid #cbd5e1;border-radius:2px;background:#fff}
.presence-activity-meta{text-align:left!important}.presence-activity-meta label{display:inline-flex;align-items:center;gap:2px;margin-right:3px;font-size:.48rem}.presence-activity-meta input{width:86px;font-size:.48rem}
.presence-total-presence-cell{font-weight:800}
@media(max-width:1100px){.presence-toolbar{grid-template-columns:1fr!important}.presence-toolbar-right,.presence-week-nav{justify-content:center!important}#presenceTable .presence-control-head,#presenceTable .presence-row-controls{width:82px!important}}

/* SiteLog Index */
.sitelog-index-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.sitelog-index-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:15px}.dark .sitelog-index-card{background:#111827;border-color:#374151}
.sitelog-index-card h3{font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;color:#475569;font-weight:850;margin-bottom:10px}
.sitelog-index-card dl{display:grid;grid-template-columns:minmax(130px,1fr) minmax(100px,1fr);gap:6px 10px;font-size:.72rem}.sitelog-index-card dt{color:#64748b}.sitelog-index-card dd{font-weight:700}
.sitelog-index-wide,.sitelog-index-finance{grid-column:1/-1}.index-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.index-kpis>div{padding:12px;background:#fff;border-radius:8px;border:1px solid #e2e8f0}.dark .index-kpis>div{background:#1f2937;border-color:#374151}
.index-kpis small{display:block;color:#64748b;font-size:.62rem}.index-kpis strong{font-size:1rem;color:#0066cc}.index-kpis .negative{color:#dc2626}
.index-kpi-help{font-size:.7rem;color:#64748b;margin:-3px 0 10px}
.index-kpi-registry th{text-align:center;vertical-align:middle}
.index-kpi-registry td{font-size:.7rem;vertical-align:middle}
.index-kpi-registry td:nth-child(2){white-space:nowrap}
.index-kpi-check,.index-kpi-current{text-align:center!important}
.index-kpi-current{font-weight:800;color:#0066cc;white-space:nowrap}.index-kpi-current.negative{color:#dc2626}
.economic-control-center{padding:0!important;overflow:hidden;border-color:#cbd5e1!important}
.economic-control-title{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;background:linear-gradient(110deg,#0f172a,#172554);color:#fff}
.economic-control-title h3{color:#fff!important;margin:0 0 3px!important;font-size:.9rem!important}.economic-control-title p{margin:0;color:#cbd5e1;font-size:.68rem}
.economic-live-badge{white-space:nowrap;padding:5px 9px;border:1px solid rgba(134,239,172,.5);border-radius:999px;background:rgba(22,163,74,.2);color:#bbf7d0;font-size:.61rem;font-weight:850;letter-spacing:.06em}
.economic-total-strip{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:1px;background:#cbd5e1;border-bottom:1px solid #cbd5e1}
.economic-total-strip.economic-total-strip-seven{grid-template-columns:repeat(7,minmax(118px,1fr))}
.economic-total-strip>div{padding:12px 15px;background:#fff}.economic-total-strip small{display:block;color:#64748b;font-size:.57rem;font-weight:800;letter-spacing:.07em}.economic-total-strip strong{display:block;margin-top:2px;font-size:1rem;color:#0f172a}
.economic-total-strip .is-positive{background:#f0fdf4}.economic-total-strip .is-positive strong{color:#166534}.economic-total-strip .is-negative{background:#fef2f2}.economic-total-strip .is-negative strong{color:#b91c1c}
.economic-kpi-table{margin:0!important;border:0!important}.economic-kpi-table thead th{position:sticky;top:0;z-index:2;background:#e2e8f0!important;color:#334155!important;font-size:.58rem!important;letter-spacing:.04em;text-transform:uppercase;border-color:#cbd5e1!important;padding:8px!important}
.economic-kpi-table tbody tr{transition:background .12s}.economic-kpi-table tbody tr:hover{background:#f8fafc}.economic-kpi-table tbody tr.is-header-kpi{background:#eff6ff}.economic-kpi-table tbody tr.is-header-kpi:hover{background:#dbeafe}
.economic-kpi-table td{padding:8px!important;border-color:#e2e8f0!important}.economic-kpi-table td:nth-child(3){min-width:145px}.economic-kpi-table .economic-formula{min-width:225px;color:#334155;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.62rem}.economic-kpi-table .economic-description{min-width:260px;color:#64748b;text-align:left!important}
.economic-group{display:inline-flex;align-items:center;white-space:nowrap;padding:3px 7px;border-radius:999px;font-size:.57rem;font-weight:800;background:#e2e8f0;color:#334155}.economic-group-budget-baseline{background:#dcfce7;color:#166534}.economic-group-project-cost{background:#dbeafe;color:#1d4ed8}.economic-group-wbs-cost-control{background:#fef3c7;color:#92400e}.economic-group-contracted-extra{background:#ede9fe;color:#6d28d9}.economic-group-technician-cost{background:#cffafe;color:#0e7490}
.economic-header-tag{display:inline-block;margin-left:5px;padding:1px 4px;border-radius:3px;background:#172554;color:#fff;font-size:.46rem;vertical-align:middle;letter-spacing:.04em}
.economic-status{display:inline-flex;justify-content:center;min-width:76px;padding:3px 7px;border-radius:999px;font-size:.56rem;font-weight:850;white-space:nowrap}.economic-status-good{background:#dcfce7;color:#166534}.economic-status-bad{background:#fee2e2;color:#991b1b}.economic-status-warn{background:#fef3c7;color:#92400e}.economic-status-info{background:#dbeafe;color:#1e40af}.economic-status-neutral{background:#e5e7eb;color:#4b5563}
.economic-cc-section{border-top:4px solid #172554}.economic-cc-table th{text-align:center!important;background:#172554!important;color:#fff!important;font-size:.6rem!important}.economic-cc-table td{text-align:right!important;font-size:.68rem!important}.economic-cc-table td:first-child{text-align:left!important}.economic-positive{color:#15803d;font-weight:800}.economic-negative{color:#dc2626;font-weight:800}
.economic-kpi-catalog-section{padding:0!important;overflow:hidden}.economic-kpi-catalog-section>h3{padding:15px 18px 0;margin-bottom:6px}.economic-kpi-catalog-section>.index-kpi-help{padding:0 18px}
.economic-activity-map{padding:0!important;overflow:hidden;border-color:#94a3b8!important}.economic-map-title{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 18px;background:#f1f5f9;border-bottom:1px solid #cbd5e1}.economic-map-title h3{margin:0 0 4px!important;color:#0f172a!important;font-size:.86rem!important}.economic-map-title p{margin:0;color:#64748b;font-size:.67rem}.economic-unassigned-summary{display:flex;gap:8px;flex-shrink:0}.economic-unassigned-summary span{display:flex;flex-direction:column;padding:6px 9px;background:#fff;border:1px solid #cbd5e1;border-radius:7px}.economic-unassigned-summary small{font-size:.49rem;color:#64748b;font-weight:800;letter-spacing:.04em}.economic-unassigned-summary b{font-size:.72rem;color:#334155}
.economic-activity-list{display:flex;flex-direction:column;gap:8px;padding:12px;background:#e2e8f0}.economic-activity-card{--activity-color:#64748b;background:#fff;border:1px solid #cbd5e1;border-left:6px solid var(--activity-color);border-radius:8px;overflow:hidden}.economic-activity-blue{--activity-color:#2563eb}.economic-activity-orange{--activity-color:#f59e0b}.economic-activity-purple{--activity-color:#7c3aed}.economic-activity-cyan{--activity-color:#0891b2}.economic-activity-green{--activity-color:#16a34a}.economic-activity-rose{--activity-color:#e11d48}.economic-activity-project{--activity-color:#475569}
.economic-activity-card>summary{display:grid;grid-template-columns:16px minmax(132px,.8fr) minmax(210px,1.55fr) repeat(3,minmax(112px,.72fr)) minmax(86px,.55fr);align-items:center;gap:10px;padding:10px 12px;cursor:pointer;list-style:none}.economic-activity-card>summary::-webkit-details-marker{display:none}.economic-activity-card[open]>summary{background:color-mix(in srgb,var(--activity-color) 8%,white);border-bottom:1px solid #cbd5e1}.economic-activity-card[open] .economic-activity-caret{transform:rotate(90deg)}.economic-activity-caret{color:var(--activity-color);font-size:.68rem;transition:transform .15s}.economic-activity-id{display:flex;flex-direction:column}.economic-activity-id strong{font-size:.84rem;color:var(--activity-color)}.economic-activity-id small{font-size:.58rem;color:#475569;font-weight:750}.economic-activity-description{font-size:.64rem;color:#64748b;line-height:1.35}.economic-activity-metric{display:flex;flex-direction:column;text-align:right}.economic-activity-metric small{font-size:.48rem;font-weight:800;color:#64748b;letter-spacing:.03em}.economic-activity-metric strong{font-size:.74rem;color:#0f172a}.economic-activity-metric.is-positive strong{color:#15803d}.economic-activity-metric.is-negative strong{color:#dc2626}
.economic-activity-body{padding:12px 14px 16px;background:#fff}.economic-activity-facts{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:12px}.economic-activity-facts span{padding:4px 8px;border-radius:999px;background:#f1f5f9;color:#475569;font-size:.57rem;border:1px solid #e2e8f0}.economic-activity-facts b{color:#0f172a}.economic-activity-body h4{margin:12px 0 5px;color:#334155;font-size:.61rem;text-transform:uppercase;letter-spacing:.055em}.economic-activity-body table{margin:0!important}.economic-activity-body th{background:#f1f5f9!important;color:#475569!important;font-size:.53rem!important;text-align:center!important}.economic-activity-body td{font-size:.62rem!important;text-align:right!important}.economic-activity-body td:first-child,.economic-activity-cost-table td:last-child,.economic-activity-ods-table td:nth-child(4),.economic-activity-ods-table td:nth-child(5){text-align:left!important}.economic-activity-total-row{background:#f8fafc;font-weight:800;border-top:2px solid #cbd5e1}.economic-empty-row{text-align:center!important;color:#94a3b8!important;font-style:italic}.economic-activity-ods-table th:nth-child(5),.economic-activity-ods-table td:nth-child(5){min-width:250px}
.dark .economic-map-title{background:#172033}.dark .economic-map-title h3{color:#f8fafc!important}.dark .economic-activity-list{background:#111827}.dark .economic-activity-card,.dark .economic-activity-body{background:#1f2937}.dark .economic-activity-card[open]>summary{background:#172033}.dark .economic-activity-metric strong,.dark .economic-activity-facts b{color:#f8fafc}.dark .economic-activity-description,.dark .economic-activity-id small{color:#cbd5e1}
.dark .economic-total-strip>div{background:#111827}.dark .economic-total-strip strong{color:#f8fafc}.dark .economic-kpi-table tbody tr.is-header-kpi{background:rgba(30,64,175,.25)}
@media(max-width:1180px){.economic-total-strip.economic-total-strip-seven{grid-template-columns:repeat(4,minmax(120px,1fr))}}
@media(max-width:1000px){.economic-total-strip,.economic-total-strip.economic-total-strip-seven{grid-template-columns:repeat(2,minmax(130px,1fr))}.economic-control-title{align-items:flex-start;flex-direction:column}.economic-map-title{align-items:flex-start;flex-direction:column}.economic-activity-card>summary{grid-template-columns:16px minmax(125px,.8fr) 1fr minmax(105px,.7fr)}.economic-activity-card>summary .economic-activity-metric:nth-of-type(n+4),.economic-activity-card>summary>.economic-status{display:none}}
@media(max-width:850px){.sitelog-index-grid{grid-template-columns:1fr}.sitelog-index-wide,.sitelog-index-finance{grid-column:auto}.index-kpis{grid-template-columns:repeat(2,1fr)}}

/* V10.3 — Smart Store TT0 hierarchy editor */
.smartstore-tt0-category{border:1px solid rgba(148,163,184,.45)!important;border-left:7px solid var(--tt0-category-color)!important;border-radius:9px!important;overflow:hidden}
.smartstore-tt0-category>.tt0-cat-header{background:color-mix(in srgb,var(--tt0-category-color) 18%,white)!important;padding:8px!important}
.smartstore-tt0-subcategory{margin-left:34px!important;border-left-width:5px!important}
.smartstore-tt0-subcategory>.tt0-cat-header{background:var(--tt0-category-color)!important}
.tt0-drag-handle{cursor:grab;font-size:1.05rem;color:#475569;padding:0 5px;user-select:none}
.tt0-subcategory-mark{font-size:1.1rem;font-weight:900;color:#475569}
.tt0-color-control{display:inline-flex;width:31px;height:30px;border-radius:5px;overflow:hidden;border:1px solid #cbd5e1}
.tt0-color-control input{width:42px;height:38px;border:0;padding:0;margin:-4px}
.tt0-dragging{opacity:.42}.tt0-drop-target{outline:3px solid #0066cc!important;outline-offset:3px}
.smartstore-tracker-subcategory{margin-left:22px!important;width:calc(100% - 22px)!important}
.smartstore-tracker-subcategory>summary{border-left:6px solid rgba(0,0,0,.16)!important}

/* V10.4 unified TT2/TT3/TT4 layout */
.unified-tt-card,.smartstore-tracker-table,.asrs-rail-aisle,.asrs-busbar-combined{border:1px solid #cbd5e1!important;border-radius:9px!important;overflow:hidden!important;background:#fff}
.unified-tt-titlebar{display:flex!important;justify-content:space-between!important;align-items:center!important;min-height:44px!important}
.unified-tt-title-metrics{display:flex;align-items:center;gap:10px}
.unified-schedule-header td{padding:9px 11px!important;font-weight:850!important}
.unified-schedule-header td>span:first-child{float:left}.unified-schedule-header .schedule-health-status{float:right}
.unified-install-header td,.unified-install-row td{background:#ecfdf5!important;color:#14532d!important}.unified-install-header td{border-left:6px solid #16a34a!important}
.unified-plc-header td,.unified-plc-row td{background:#f5f3ff!important;color:#4c1d95!important}.unified-plc-header td{border-left:6px solid #7c3aed!important}
.unified-install-row td,.unified-plc-row td{border-bottom:1px solid rgba(148,163,184,.27)!important}
.smartstore-tracker-table[open]{display:flex!important;flex-direction:column!important}
.smartstore-tracker-table>summary{order:1!important}.smartstore-tracker-table>.overflow-x-auto{order:2!important}.smartstore-tracker-table>.smart-install-summary{order:3!important}.smartstore-tracker-table>.smart-plc-summary{order:4!important}
.smart-install-summary{background:#ecfdf5!important;border-left:6px solid #16a34a!important}.smart-plc-summary{background:#f5f3ff!important;border-left:6px solid #7c3aed!important}
.asrs-rail-aisle,.asrs-busbar-combined{display:flex!important;flex-direction:column!important}
.asrs-rail-aisle-header,.asrs-busbar-aisle-title{order:1!important}
.asrs-rail-sections,.asrs-busbar-components,.asrs-busbar-components-grid,.asrs-busbar-activity-grid{order:2!important}
.asrs-activity-schedule,.asrs-busbar-shared-schedule{order:3!important;background:#ecfdf5!important;border-left:6px solid #16a34a!important}
.asrs-accordion-body{display:flex!important;flex-direction:column!important}.asrs-accordion-body>.asrs-phase-schedule{order:99!important;background:#ecfdf5!important;border-left:6px solid #16a34a!important}
.asrs-schedule-heading{display:flex!important;justify-content:space-between!important;align-items:center!important}
.schedule-health-status{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
.schedule-health-status i{width:9px!important;height:9px!important;border-radius:50%!important}
.schedule-health-status.schedule-green i{background:#16a34a!important}.schedule-health-status.schedule-yellow i{background:#f59e0b!important}.schedule-health-status.schedule-red i{background:#ef4444!important}.schedule-health-status.schedule-gray i{background:#9ca3af!important}

/* Presence date and color rules */
#presenceTable .presence-week-a:not(.presence-week-header),#presenceTable .presence-week-b:not(.presence-week-header){background:transparent!important}
#presenceTable .presence-week-header.presence-week-a{background:#dbeafe!important}#presenceTable .presence-week-header.presence-week-b{background:#dcfce7!important}
#presenceTable .pres-day-head{background:#fff!important;position:relative!important;height:92px!important}
#presenceTable td.presence-saturday,#presenceTable th.presence-saturday{background:#f3f4f6!important}
#presenceTable td.presence-sunday,#presenceTable th.presence-sunday,#presenceTable td.presence-holiday-us,#presenceTable th.presence-holiday-us,#presenceTable td.presence-holiday-mx,#presenceTable th.presence-holiday-mx{background:#fef2f2!important}
#presenceTable .pres-day-vertical{font-size:.62rem!important;font-weight:500!important}
#presenceTable .presence-flags{position:absolute!important;top:3px!important;left:50%!important;transform:translateX(-50%)!important;writing-mode:vertical-rl!important;text-orientation:upright!important;font-size:.7rem!important;line-height:1!important}
#presenceTable .presence-cell{position:relative;z-index:2}
.presence-activity-fixed-dates{display:flex;align-items:center;gap:3px;margin-top:3px}.presence-activity-fixed-dates input{width:104px!important;font-size:.54rem!important;padding:1px 2px!important}.presence-activity-fixed-dates span{font-size:.55rem}

/* Internal reusable SiteLog resource directory */
.sitelog-resource-toolbar{display:flex;align-items:center;gap:7px;flex-wrap:wrap}#resourceLibrarySelect{min-width:270px}

/* V12 — Tracker header actions now match SiteLog header (flex justify-between, right-aligned buttons) */

/* TT0 Smart Store color hierarchy */
.smartstore-tt0-category>.tt0-cat-header{
  background:var(--tt0-category-base)!important;color:#fff!important
}
.smartstore-tt0-category>.tt0-cat-header .tt0-input{
  background:rgba(255,255,255,.94)!important;color:#111827!important
}
.smartstore-tt0-category>.tt0-cat-header .tt0-drag-handle,
.smartstore-tt0-category>.tt0-cat-header .tt0-subcategory-mark{color:#fff!important}
.smartstore-tt0-subcategory>.tt0-cat-header{
  background:var(--tt0-category-color)!important;color:#172033!important
}
.smartstore-tt0-subcategory>.tt0-cat-header .tt0-drag-handle,
.smartstore-tt0-subcategory>.tt0-cat-header .tt0-subcategory-mark{color:#334155!important}

/* Date state: black dot when dates are not configured */
.schedule-health-status.schedule-black{color:#111827!important}
.schedule-health-status.schedule-black i{background:#111827!important}

/* Installation / PLC title bars darker than their rows */
.unified-install-header td,
.smart-install-summary .smart-summary-title,
.asrs-schedule-heading{
  background:#15803d!important;color:#fff!important
}
.unified-install-row td,
.smart-install-summary>label,
.smart-install-summary>span{
  background:#ecfdf5!important;color:#14532d!important
}
.unified-plc-header td,
.smart-plc-summary .smart-summary-title{
  background:#6d28d9!important;color:#fff!important
}
.unified-plc-row td,
.smart-plc-summary>label,
.smart-plc-summary>span{
  background:#f5f3ff!important;color:#4c1d95!important
}
.smart-summary-title .schedule-health-status,
.unified-schedule-header .schedule-health-status,
.asrs-schedule-heading .schedule-health-status{color:#fff!important}
.smart-summary-title .schedule-health-status.schedule-black i,
.unified-schedule-header .schedule-health-status.schedule-black i,
.asrs-schedule-heading .schedule-health-status.schedule-black i{background:#111827!important;border:1px solid #fff}

/* Smart Store section bars only control show/hide; dates belong to categories */
.smartstore-flow-group>.smartstore-group-summary{display:none!important}
.smartstore-flow-group-body{padding-top:10px!important}
.unified-smart-tt4{margin-bottom:14px!important}
.unified-smart-tt4>summary{
  min-height:42px!important;display:flex!important;align-items:center!important;
  justify-content:space-between!important;padding:9px 12px!important
}
.unified-smart-tt4>summary strong{display:flex;align-items:center;gap:5px;font-size:.68rem}
.smartstore-tracker-master>summary{font-weight:850!important}
.smartstore-tracker-subcategory{
  margin-left:28px!important;width:calc(100% - 28px)!important;
  border-left:5px solid var(--smart-category-base)!important
}
.smartstore-tracker-subcategory>summary{font-weight:750!important}
.unified-smart-tt4>.overflow-x-auto{order:2!important}
.unified-smart-tt4>.smart-install-summary{order:3!important}
.unified-smart-tt4>.smart-plc-summary{order:4!important}
.unified-smart-tt4 .smartstore-activity-table{
  width:100%!important;table-layout:fixed!important
}
.unified-smart-tt4 .smartstore-activity-table td:nth-child(1){width:38px!important}
.unified-smart-tt4 .smartstore-activity-table td:nth-child(2){width:36%!important}
.unified-smart-tt4 .smartstore-activity-table td:nth-child(3),
.unified-smart-tt4 .smartstore-activity-table td:nth-child(4){width:32%!important}

/* V10.6 — Smart Store uses the actual TT2 DOM and visual format */
.unified-smart-tt4.tt2-block{
  display:block!important;
  border:1px solid #cbd5e1!important;
  border-radius:9px!important;
  overflow:hidden!important;
  background:#fff!important;
}
.unified-smart-tt4.tt2-block>summary.smart-tt2-titlebar{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  min-height:45px!important;
  padding:9px 13px!important;
  cursor:pointer!important;
  list-style:none!important;
}
.unified-smart-tt4.tt2-block>summary::-webkit-details-marker{display:none!important}
.smart-tt2-title-metrics{display:flex!important;align-items:center!important;gap:10px!important}
.smart-tt2-title-metrics b{font-size:.7rem!important}
.smart-tt2-activity-area{
  display:block!important;
  width:100%!important;
  order:initial!important;
}
.tt2-smart-table{
  width:100%!important;
  table-layout:fixed!important;
  border-collapse:collapse!important;
}
.tt2-smart-table .col-header td{
  background:#f3f4f6!important;
  color:#475569!important;
  font-size:.67rem!important;
  font-weight:800!important;
  padding:8px 10px!important;
}
.tt2-smart-table td{
  padding:7px 10px!important;
  border-bottom:1px solid #e5e7eb!important;
}
.tt2-smart-table td:nth-child(1){width:42px!important}
.tt2-smart-table td:nth-child(2){width:35%!important}
.tt2-smart-table td:nth-child(3),
.tt2-smart-table td:nth-child(4){width:32.5%!important}
.smart-tt2-date-panel{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(120px,1fr))!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-top:1px solid #cbd5e1!important;
}
.smart-tt2-date-panel .smart-summary-title{
  grid-column:1/-1!important;
  min-height:38px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  padding:8px 11px!important;
  font-size:.7rem!important;
  font-weight:850!important;
}
.smart-tt2-date-panel>label,
.smart-tt2-date-panel>span{
  min-height:54px!important;
  padding:7px 9px!important;
  border-right:1px solid rgba(148,163,184,.28)!important;
  border-bottom:1px solid rgba(148,163,184,.28)!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
}
.smart-tt2-date-panel.smart-install-summary .smart-summary-title{
  background:#15803d!important;color:#fff!important
}
.smart-tt2-date-panel.smart-install-summary>label,
.smart-tt2-date-panel.smart-install-summary>span{
  background:#ecfdf5!important;color:#14532d!important
}
.smart-tt2-date-panel.smart-plc-summary .smart-summary-title{
  background:#6d28d9!important;color:#fff!important
}
.smart-tt2-date-panel.smart-plc-summary>label,
.smart-tt2-date-panel.smart-plc-summary>span{
  background:#f5f3ff!important;color:#4c1d95!important
}
.smartstore-tracker-subcategory.unified-smart-tt4{
  margin-left:28px!important;
  width:calc(100% - 28px)!important;
}
@media(max-width:900px){
  .smart-tt2-date-panel{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* V10.7 — final TT2 visual standard, also applied to Smart Store */

/* Installation title: darker green than data rows, BLACK text for legibility. Data rows: black text. */
.unified-install-header td,
.smart-tt2-date-panel.smart-install-summary .smart-summary-title,
.smart-install-summary .smart-summary-title{
  background:#4ade80!important;
  color:#0b3d21!important;
}
.unified-install-row td,
.smart-tt2-date-panel.smart-install-summary>label,
.smart-tt2-date-panel.smart-install-summary>span,
.smart-install-summary>label,
.smart-install-summary>span{
  background:#ecfdf5!important;
  color:#111827!important;
}
.unified-install-row td small,
.unified-install-row td b,
.smart-install-summary small,
.smart-install-summary b,
.smart-install-summary label{
  color:#111827!important;
}

/* PLC title: darker violet than data rows, BLACK text for legibility. Data rows: black text. */
.unified-plc-header td,
.smart-tt2-date-panel.smart-plc-summary .smart-summary-title,
.smart-plc-summary .smart-summary-title{
  background:#c4b5fd!important;
  color:#2e1065!important;
}
.unified-plc-row td,
.smart-tt2-date-panel.smart-plc-summary>label,
.smart-tt2-date-panel.smart-plc-summary>span,
.smart-plc-summary>label,
.smart-plc-summary>span{
  background:#f5f3ff!important;
  color:#111827!important;
}
.unified-plc-row td small,
.unified-plc-row td b,
.smart-plc-summary small,
.smart-plc-summary b,
.smart-plc-summary label{
  color:#111827!important;
}

/* The semaphore label always follows its own dot color, even on dark title bars. */
.smart-summary-title .schedule-health-status.schedule-green,
.unified-schedule-header .schedule-health-status.schedule-green,
.smart-tt2-titlebar .schedule-health-status.schedule-green{color:#22c55e!important}
.smart-summary-title .schedule-health-status.schedule-yellow,
.unified-schedule-header .schedule-health-status.schedule-yellow,
.smart-tt2-titlebar .schedule-health-status.schedule-yellow{color:#f59e0b!important}
.smart-summary-title .schedule-health-status.schedule-red,
.unified-schedule-header .schedule-health-status.schedule-red,
.smart-tt2-titlebar .schedule-health-status.schedule-red{color:#ef4444!important}
.smart-summary-title .schedule-health-status.schedule-gray,
.unified-schedule-header .schedule-health-status.schedule-gray,
.smart-tt2-titlebar .schedule-health-status.schedule-gray{color:#9ca3af!important}
.smart-summary-title .schedule-health-status.schedule-black,
.unified-schedule-header .schedule-health-status.schedule-black,
.smart-tt2-titlebar .schedule-health-status.schedule-black{color:#111827!important}

/* Smart Store is rendered with the same TT2 hierarchy and dimensions. */
.unified-smart-tt4.tt2-block{
  display:block!important;
  width:100%!important;
}
.unified-smart-tt4 .tt2-activity-table{
  width:100%!important;
  table-layout:fixed!important;
  border-collapse:collapse!important;
}
.unified-smart-tt4 .tt2-activity-table .col-header td{
  background:#f3f4f6!important;
  color:#111827!important;
  font-weight:800!important;
}
.unified-smart-tt4 .tt2-activity-table td{
  color:#111827!important;
}
.unified-smart-tt4 .smart-tt2-date-panel{
  width:100%!important;
}

/* V10.8 integrated Builder → Tracker → SiteLog */
.sitelog-gantt-table{width:100%!important;min-width:920px!important;table-layout:fixed!important;margin:0!important}.sitelog-gantt-table th:nth-child(1){width:74px}.sitelog-gantt-table th:nth-child(2){width:270px}.sitelog-gantt-table th:nth-child(3){width:105px}.sitelog-gantt-table th:nth-child(4),.sitelog-gantt-table th:nth-child(5){width:140px}.sitelog-gantt-table th:nth-child(6){width:110px}.sitelog-gantt-table th:nth-child(7){width:78px}.sitelog-gantt-table th:nth-child(8){width:auto}.sitelog-gantt-table th{text-align:center!important}.sitelog-gantt-table td:nth-child(n+3){white-space:nowrap}.sitelog-gantt-table td:nth-child(4) input,.sitelog-gantt-table td:nth-child(5) input{width:126px;min-width:126px}.gantt-header-filler,.gantt-row-filler{background:inherit!important}
.gantt-track-chip{display:inline-flex;padding:3px 8px;border-radius:999px;font-size:.62rem;font-weight:800}.gantt-install{background:#dcfce7;color:#166534}.gantt-plc{background:#ede9fe;color:#5b21b6}
.gantt-conflicts{margin-top:12px;padding:12px;border-left:5px solid #f59e0b;background:#fffbeb;color:#78350f;font-size:.72rem}
.gantt-toolbar{display:flex;align-items:flex-end;justify-content:flex-start;gap:8px;flex-wrap:wrap;width:100%}.gantt-toolbar-title{margin-right:8px;align-self:center;min-width:150px}.gantt-filter-field{display:flex;flex-direction:column;align-items:center;gap:2px}.gantt-filter-field>span{display:block;width:100%;font-weight:700;line-height:1;text-align:center}.gantt-filter-field .select-input{min-width:112px}.gantt-resync-last{margin-left:auto}
.sitelog-gantt-table th.gantt-date-complete{background:#1d4ed8!important;color:#fff!important}.sitelog-gantt-table th.gantt-date-incomplete{background:#1d4ed8!important;color:#ef4444!important}.sitelog-gantt-table th.gantt-date-neutral{background:#1d4ed8!important;color:#fff!important}
.activity-active-day{outline:2px solid #3b82f6!important;outline-offset:-2px!important}
.gantt-row-excluded td{background:#e5e7eb!important;color:#6b7280!important}.gantt-row-excluded input:disabled{background:#f3f4f6!important;color:#6b7280!important;cursor:not-allowed}
.sitelog-gantt-table tbody tr{height:38px!important;max-height:38px!important}.sitelog-gantt-table tbody td{height:38px!important;max-height:38px!important;padding-top:3px!important;padding-bottom:3px!important;overflow:hidden!important;text-overflow:ellipsis}.sitelog-gantt-table tbody input,.sitelog-gantt-table tbody select,.sitelog-gantt-table tbody button{height:28px!important;max-height:28px!important;box-sizing:border-box!important}
.presence-range-legend{display:inline-flex;align-items:center;padding:2px 5px;border-radius:4px;font-size:.5rem;font-weight:700;color:#713f12}.presence-range-outside{background:#fef3c7}.presence-outside-before,.presence-outside-after{background-color:#fef3c7!important}.presence-project-start{border-left:3px solid #dc2626!important}.presence-project-end{border-right:3px solid #dc2626!important}
#presenceTable .presence-manual-activity>td:not(:has(> .presence-cell)){background:var(--manual-row-color,#e0f2fe)!important}.presence-manual-activity td.activity-active-day{background:#bfdbfe!important}.presence-empty-custom-row td{background:var(--empty-row-color,#ffffff)!important}
.presence-manual-editor{display:flex;align-items:center;gap:3px;width:100%;height:22px}.presence-manual-editor .presence-activity-name{min-width:0;height:20px;line-height:20px}.presence-color-select{width:24px!important;min-width:24px!important;max-width:24px!important;height:20px!important;padding:0!important;border:1px solid #94a3b8!important;border-radius:3px!important;color:transparent!important;cursor:pointer}.presence-color-select option{color:#111827;background:#fff}
#presenceTable tbody tr[data-pres-order-index]{height:28px!important;max-height:28px!important}#presenceTable tbody tr[data-pres-order-index]>td{height:28px!important;max-height:28px!important;padding-top:1px!important;padding-bottom:1px!important}.presence-drag-handle{display:inline-flex;align-items:center;justify-content:center;width:16px;height:20px;cursor:grab;user-select:none}.presence-drag-handle:active{cursor:grabbing}
.delay-analysis-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.delay-analysis-kpis>div{padding:15px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc}.delay-analysis-kpis small{display:block;color:#64748b;font-size:.65rem}.delay-analysis-kpis strong{font-size:1.05rem}
.presence-empty{background:transparent!important;color:transparent!important;border:1px dashed rgba(148,163,184,.25)!important}.presence-linked-activity .presence-label-cell{background:#eef2ff!important;color:#312e81!important}.presence-linked-activity .presence-row-controls{background:#f8fafc!important}
#sitelogBackProject.hidden{display:none!important}
@media(max-width:850px){.delay-analysis-kpis{grid-template-columns:1fr}}

/* ===== Smart Store — category-level rollup (masters + their subcategories share ONE date/PLC panel) ===== */
.smartstore-category-group{border:1px solid #e5e7eb;border-radius:12px;margin:14px 0;overflow:hidden;background:#fff}
.dark .smartstore-category-group{border-color:#374151;background:#111827}
.smartstore-category-group-bar{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:11px 14px;cursor:pointer;list-style:none;background:#f8fafc;border-left:5px solid #1C64B7;font-weight:800;font-size:.85rem}
.dark .smartstore-category-group-bar{background:#1f2937;color:#f3f4f6}
.smartstore-category-group-bar::-webkit-details-marker{display:none}
.smartstore-category-group-bar .smart-master-metrics b{transition:transform .15s}
.smartstore-category-group[open]>.smartstore-category-group-bar .smart-master-metrics b{transform:rotate(180deg)}
.smartstore-category-group-body{padding:12px 14px}
.smartstore-category-tables{margin-top:10px}
.smart-subcount-chip{background:#e5e7eb;color:#374151!important}
.dark .smart-subcount-chip{background:#374151;color:#e5e7eb!important}
.smartstore-table-mini-dates{display:flex;flex-wrap:wrap;gap:14px;align-items:center;padding:7px 12px;background:#f8fafc;border-top:1px solid #e5e7eb;font-size:.68rem;color:#6b7280}
.dark .smartstore-table-mini-dates{background:#1f2937;border-color:#374151}
.smartstore-table-mini-dates strong{color:#111827;font-weight:700}
.dark .smartstore-table-mini-dates strong{color:#f3f4f6}
.smartstore-table-mini-dates-note{margin-left:auto;font-style:italic;opacity:.75}
/* Subcategory tables default collapsed (no "open" attr) — style the closed summary so it's still scannable */
.smartstore-tracker-subcategory:not([open])>.smart-tt2-titlebar{border-radius:8px}

/* ===== Point 18 — semaphore labels need their own background chip for visibility ===== */
/* Overrides the earlier "dot + text only, transparent background" rule: on colored */
/* header bars (green Installation, purple PLC, Smart Store titlebars) a plain colored */
/* label blends in and is hard to read. Give every "On Track / At Risk / Delayed / */
/* Not Started / Date not set" badge its own light pill so it always stands out. */
.schedule-health-status{
  background:rgba(255,255,255,.94)!important;
  padding:2px 9px!important;
  border-radius:999px!important;
  box-shadow:0 1px 3px rgba(0,0,0,.18)!important;
  border:1px solid rgba(0,0,0,.06)!important;
}
.dark .schedule-health-status{
  background:rgba(17,24,39,.88)!important;
  border-color:rgba(255,255,255,.12)!important;
}

/* ===== Smart Store — TT2 unified cards: click-to-collapse, category groups together with subcategories ===== */
.tt2-block.collapsed > *:not(.unified-tt-titlebar) { display: none !important; }
.tt2-block[data-cat-master] .unified-tt-titlebar,
.tt2-block[data-cat-sub] .unified-tt-titlebar { cursor: pointer; }
.tt2-block[data-cat-master] .unified-tt-titlebar::after,
.tt2-block[data-cat-sub] .unified-tt-titlebar::after { content: '▾'; margin-left: 8px; opacity: .8; }
.tt2-block[data-cat-master].collapsed .unified-tt-titlebar::after,
.tt2-block[data-cat-sub].collapsed .unified-tt-titlebar::after { content: '▸'; }

/* ===== Presence — blink the current week's header so it's easy to spot ===== */
@keyframes presenceWeekBlink { 0%,100%{background:#fbbf24!important;color:#78350f!important;} 50%{background:#fef3c7!important;color:#78350f!important;} }
#presenceTable .presence-week-header.presence-week-current{animation:presenceWeekBlink 1.6s ease-in-out infinite!important;font-weight:900!important}

/* ===== Point 1 — TT2 cards get a subtle background tint that differs between 1-col and 2-col view ===== */
.tracker-table-grid-1{background:#f8fafc;padding:10px;border-radius:12px}
.dark .tracker-table-grid-1{background:#111827}
.tracker-table-grid-2{background:#eff6ff;padding:10px;border-radius:12px}
.dark .tracker-table-grid-2{background:#0c1a2e}

.tt-responsive-grid.cols-1{background:#f8fafc;padding:8px;border-radius:10px}
.dark .tt-responsive-grid.cols-1{background:#111827}
.tt-responsive-grid.cols-2{background:#eff6ff;padding:8px;border-radius:10px}
.dark .tt-responsive-grid.cols-2{background:#0c1a2e}

/* ===== Point 2 — align header logo/buttons with the full-width table content below ===== */
/* Tracker and SiteLog <main> areas were widened to full-bleed (V9.6/V10) while their
   <header>/<nav> inner wrappers stayed capped at max-w-7xl (1280px) and centered,
   causing the logo/buttons row to look inset relative to the tables underneath. */
#trackerPage header>div,#trackerPage nav>div{max-width:1680px!important;width:100%!important;padding-left:8px!important;padding-right:8px!important}
#sitelogPage header>div,#sitelogPage nav>div{max-width:none!important;width:100%!important;padding-left:5px!important;padding-right:5px!important}

/* ===== Point 8 — SiteLog Settings: editable reference lists + resource directory ===== */
.settings-lists-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px}
.settings-list-card{border:1px solid #e5e7eb;border-radius:10px;padding:10px}
.dark .settings-list-card{border-color:#374151}
.settings-list-card h3{font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.03em;color:#6b7280;margin-bottom:6px}
.settings-chip-list{display:flex;flex-wrap:wrap;gap:5px;min-height:26px;margin-bottom:8px}
.settings-chip{display:inline-flex;align-items:center;gap:5px;background:#eef2ff;color:#3730a3;border-radius:999px;padding:3px 8px;font-size:.68rem;font-weight:700}
.dark .settings-chip{background:#312e81;color:#e0e7ff}
.settings-chip button{background:none;border:0;color:inherit;cursor:pointer;font-weight:900;line-height:1;padding:0 2px}
.settings-list-add{display:flex;gap:6px}
.settings-list-add input{flex:1;font-size:.7rem}


/* E80 GROUP - ONSITE HUB v11.5 — Smart Store TT2 */
.unified-tt-titlebar .unified-tt-title-metrics { margin-left:auto; display:flex; align-items:center; justify-content:flex-end; gap:10px; }
.smartstore-progress-mode-note { font-size:.7rem; color:#6b7280; }

/* V11.6 SiteLog / Presence refinement */
.tracker-sitelog-nav{font-weight:600}
.tracker-sitelog-nav:hover{background:rgba(255,255,255,.3)!important}
.tracker-sitelog-nav:hover{background:#f3f4f6}
.gantt-exclude-head,.gantt-exclude-cell{text-align:center!important;width:74px;min-width:74px}
#slview-presence .presence-table-stage{max-height:72vh;overflow:auto;position:relative}
#presenceTable thead{position:sticky;top:0;z-index:30;background:#fff}
#presenceTable thead th{background:#fff;opacity:1;vertical-align:middle;padding-top:3px;padding-bottom:3px;line-height:1.05}
#presenceTable .pres-day-head{height:auto;min-height:42px;white-space:normal;width:32px!important;min-width:32px!important;max-width:32px!important}
/* Point 4 (23/07): Excel-style active-cell column highlight on the date header. */
#presenceTable .pres-day-head.presence-col-highlight{background:#dbeafe!important;box-shadow:inset 0 0 0 2px #0066CC;position:relative;z-index:21}
.dark #presenceTable .pres-day-head.presence-col-highlight{background:#1e3a5f!important}
#presenceTable .pres-day-vertical{writing-mode:vertical-rl;transform:rotate(180deg);display:inline-block;line-height:1;min-height:44px}
#presenceTable .presence-skill-head,#presenceTable .presence-total-presence-head,#presenceTable .pres-detail-col,#presenceTable .pres-total-col{writing-mode:vertical-rl;transform:rotate(180deg);text-align:center;vertical-align:middle}
#presenceTable .presence-label-cell,#presenceTable .presence-name-head{text-align:center;vertical-align:middle}
.presence-control-legend{display:block;font-size:8px;line-height:1.25;white-space:nowrap;font-weight:500}
.presence-inline-tools{display:flex;gap:3px;justify-content:center;margin-top:3px;font-size:9px}.presence-inline-tools span{border:1px solid #d1d5db;border-radius:3px;padding:1px 3px;background:#fff}
.presence-week-current{background:#fb923c!important}
.pres-day-head.presence-day-current{background-color:#fb923c!important;color:#000!important}
.presence-saturday{background-color:#f3f4f6!important}.presence-sunday{background-color:#fee2e2!important}.presence-holiday-us{background-color:#dbeafe!important}.presence-holiday-mx{background-color:#dcfce7!important}
.pres-holiday-flag{display:block;font-size:8px;font-weight:800;line-height:1;color:#374151}
.presence-resource-name,.presence-activity-name{width:100%;text-align:center;background:transparent;border:1px solid transparent;padding:3px}.presence-resource-name:focus,.presence-activity-name:focus{background:#fff;border-color:#93c5fd;outline:none}
.presence-resource-overlap{background:#fecaca!important}.presence-resource-overlap input{color:#991b1b;font-weight:700}
.presence-empty-custom-row td{background:var(--empty-row-color)!important}.presence-empty-custom-row input[type=color]{width:28px;height:22px;padding:0;border:0;vertical-align:middle;margin-left:4px}

#presenceTable .presence-week-header.presence-week-current{animation:none!important;background:#f97316!important;color:#fff!important}
#presenceTable .presence-current-week{background-color:#fb923c!important}

/* Dynamic weekend and holiday columns. Presence colours remain visible below the tint. */
#presenceTable .pres-day-head.presence-saturday:not(.presence-day-current){background:#d1d5db!important;color:#111827!important}
#presenceTable tbody td.presence-saturday:not(.presence-day-current){background:#f8fafc!important;position:relative!important}
#presenceTable tbody td.presence-saturday:not(.presence-day-current)::after{content:"";position:absolute;inset:0;z-index:3;pointer-events:none;background:rgba(148,163,184,.12)}

#presenceTable .pres-day-head.presence-sunday:not(.presence-day-current){background:#fecaca!important;color:#7f1d1d!important}
#presenceTable tbody td.presence-sunday:not(.presence-day-current){background:#fff1f2!important;position:relative!important}
#presenceTable tbody td.presence-sunday:not(.presence-day-current)::after{content:"";position:absolute;inset:0;z-index:3;pointer-events:none;background:rgba(239,68,68,.12)}

#presenceTable .pres-day-head.presence-holiday-us:not(.presence-day-current){background:#fff!important;color:#111827!important;padding-top:18px!important;box-shadow:inset 0 0 0 2px #2563eb!important}
#presenceTable tbody td.presence-holiday-us:not(.presence-day-current){background:#eff6ff!important;position:relative!important}
#presenceTable tbody td.presence-holiday-us:not(.presence-day-current)::after{content:"";position:absolute;inset:0;z-index:3;pointer-events:none;background:rgba(59,130,246,.13)}

#presenceTable .pres-day-head.presence-holiday-mx:not(.presence-day-current){background:#fff!important;color:#111827!important;padding-top:18px!important;box-shadow:inset 0 0 0 2px #16a34a!important}
#presenceTable tbody td.presence-holiday-mx:not(.presence-day-current){background:#f0fdf4!important;position:relative!important}
#presenceTable tbody td.presence-holiday-mx:not(.presence-day-current)::after{content:"";position:absolute;inset:0;z-index:3;pointer-events:none;background:rgba(34,197,94,.13)}

#presenceTable .pres-day-head.presence-holiday-us.presence-holiday-mx:not(.presence-day-current){background:#fff!important;box-shadow:inset 2px 0 0 #2563eb,inset -2px 0 0 #16a34a,inset 0 2px 0 #7c3aed,inset 0 -2px 0 #7c3aed!important}
#presenceTable tbody td.presence-holiday-us.presence-holiday-mx:not(.presence-day-current)::after{background:linear-gradient(90deg,rgba(59,130,246,.12),rgba(34,197,94,.12))}

#presenceTable .pres-holiday-flag{
  position:absolute!important;
  top:3px!important;
  left:50%!important;
  transform:translateX(-50%)!important;
  display:block!important;
  white-space:nowrap!important;
  writing-mode:horizontal-tb!important;
  text-orientation:mixed!important;
  line-height:1!important;
  gap:2px!important;
}
#presenceTable .pres-holiday-flag img{
  display:inline-block!important;
  width:18px!important;
  height:12px!important;
  object-fit:cover!important;
  border:1px solid rgba(15,23,42,.35)!important;
  border-radius:1px!important;
  vertical-align:top!important;
}
#presenceTable .pres-day-head.presence-day-current.presence-holiday-us,
#presenceTable .pres-day-head.presence-day-current.presence-holiday-mx{padding-top:16px!important}

#presenceTable .pres-day-head.presence-day-current{background-color:#fb923c!important;color:#000!important}
#presenceTable .pres-day-head.presence-day-current.presence-holiday-us{box-shadow:inset 0 0 0 2px #2563eb!important}
#presenceTable .pres-day-head.presence-day-current.presence-holiday-mx{box-shadow:inset 0 0 0 2px #16a34a!important}
#presenceTable .pres-day-head.presence-day-current.presence-holiday-us.presence-holiday-mx{box-shadow:inset 2px 0 0 #2563eb,inset -2px 0 0 #16a34a,inset 0 2px 0 #7c3aed,inset 0 -2px 0 #7c3aed!important}
#presenceTable tbody td.presence-day-current{
  position:relative!important;
  background-color:#ffedd5!important;
}
#presenceTable tbody td.presence-day-current::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:3;
  pointer-events:none;
  background:rgba(251,146,60,.22);
}

/* ===== Overview — info icons on Analytics charts ===== */
.ov-info-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;background:#e5e7eb;color:#4b5563;font-size:.68rem;cursor:help;font-weight:700}
.dark .ov-info-icon{background:#374151;color:#d1d5db}

/* ===== Presence — row selection (click anywhere on a row to select it) ===== */
#presenceTable tbody tr[data-pres-order-index]{cursor:pointer}
#presenceTable tbody tr.presence-row-selected td{box-shadow:inset 0 2px 0 #0066CC, inset 0 -2px 0 #0066CC!important;}
#presenceTable tbody tr.presence-row-selected td:first-child{box-shadow:inset 2px 2px 0 #0066CC, inset 0 -2px 0 #0066CC!important;}
#presenceTable tbody tr.presence-row-selected td:last-child{box-shadow:inset -2px 2px 0 #0066CC, inset 0 -2px 0 #0066CC!important;}

/* ===== Settings/Resources — Company field blinks until filled when Brand = External ===== */
@keyframes presenceCompanyBlink { 0%,100%{background:#fecaca!important;border-color:#dc2626!important;} 50%{background:#fff!important;border-color:#dc2626!important;} }

/* TT2 delay color fix — CSS only. Preserve all Smart Store JavaScript/HTML. */
.pb-table td[style*="color:#00B050"]{color:#00B050!important}
.pb-table td[style*="color:#dc2626"]{color:#dc2626!important}
.pb-table td[style*="color:#6b7280"]{color:#6b7280!important}

/* Smart Store Bus-Bar / Bar-Code linear dropdowns: keep progress background,
   but use black text for the selected value and menu options. */
.select-input[data-tt2-linear]{color:#000!important}
.select-input[data-tt2-linear] option{color:#000!important}

/* TT2 Mechanical/Electrical percentage columns — always black, including
   Bus-Bar and Bar-Code linear activity percentages. */
.pb-table .pct-cell{color:#000!important}
.presence-company-blink{animation:presenceCompanyBlink 1s ease-in-out infinite!important;}

/* TT2 / Smart Store — fixed vertical category hierarchy */
.smartstore-progress-layout{
  align-items:start;
}
.smartstore-progress-layout .unified-tt-card[data-smart-group]{
  margin-bottom:0!important;
  border-radius:0!important;
}
.smartstore-progress-layout .unified-tt-card[data-cat-master]{
  margin-top:16px!important;
  border-radius:9px 9px 0 0!important;
}
.smartstore-progress-layout .unified-tt-card[data-cat-sub]{
  border-top:0!important;
}
.smartstore-progress-layout .unified-tt-card.smartstore-group-tail{
  border-radius:0 0 9px 9px!important;
  margin-bottom:16px!important;
}
.smartstore-progress-layout .unified-tt-titlebar{
  user-select:none;
  cursor:pointer!important;
}
.smartstore-progress-layout .smartstore-subcategory-card .unified-tt-titlebar{
  min-height:40px!important;
}
.smartstore-progress-individual .smartstore-subcategory-card .unified-tt-titlebar{
  height:24px!important;
  min-height:24px!important;
  max-height:24px!important;
  box-sizing:border-box!important;
  padding:2px 10px!important;
  font-size:.68rem!important;
  line-height:1.1!important;
}
.smartstore-progress-individual .smartstore-subcategory-card .unified-tt-title-metrics{
  font-size:.62rem!important;
  gap:6px!important;
}
.smartstore-progress-layout .smartstore-subcategory-card .unified-tt-titlebar > span:first-child{
  padding-left:12px;
}
/* Overall mode: Subcategory headers are secondary and use half-height bars. */
.smartstore-progress-overall .smartstore-subcategory-card .unified-tt-titlebar{
  min-height:20px!important;
  padding:2px 10px!important;
  font-size:.68rem!important;
  line-height:1.1!important;
}
.smartstore-progress-overall .smartstore-subcategory-card .unified-tt-title-metrics{
  font-size:.62rem!important;
  gap:6px!important;
}

/* TT2 Smart Store: Main/Subcategory header text is always black. */
.smartstore-progress-layout .smartstore-maincategory-card .unified-tt-titlebar,
.smartstore-progress-layout .smartstore-maincategory-card .unified-tt-titlebar *,
.smartstore-progress-layout .smartstore-subcategory-card .unified-tt-titlebar,
.smartstore-progress-layout .smartstore-subcategory-card .unified-tt-titlebar *{
  color:#000!important;
}

/* All standard TT2 systems: Installation/PLC headers match the Smart Store Individual standard. */
.tracker-table-grid:not(.smartstore-progress-layout) .unified-schedule-header td{
  height:24px!important;
  min-height:24px!important;
  max-height:24px!important;
  box-sizing:border-box!important;
  padding:2px 10px!important;
  vertical-align:middle!important;
  font-size:.68rem!important;
  font-weight:700!important;
  line-height:1.1!important;
}
.tracker-table-grid:not(.smartstore-progress-layout) .unified-schedule-header td>span{
  display:inline-flex!important;
  align-items:center!important;
  height:20px!important;
  vertical-align:middle!important;
  line-height:1!important;
}

/* Smart Store Installation/PLC headers match the active Subcategory header height. */
.smartstore-progress-layout .unified-schedule-header td{
  vertical-align:middle!important;
  font-weight:700!important;
}
.smartstore-progress-layout .unified-schedule-header td>span{
  display:inline-flex!important;
  align-items:center!important;
  vertical-align:middle!important;
  line-height:1!important;
}
.smartstore-progress-individual .unified-schedule-header td>span{height:20px!important}
.smartstore-progress-overall .unified-schedule-header td>span{height:16px!important}
.smartstore-progress-overall .smartstore-overall-tail .unified-schedule-header:first-of-type td::before{
  display:inline-flex!important;
  align-items:center!important;
  height:16px!important;
  vertical-align:middle!important;
  line-height:1!important;
}
.smartstore-progress-individual .unified-schedule-header td{
  height:24px!important;
  min-height:24px!important;
  max-height:24px!important;
  box-sizing:border-box!important;
  padding:2px 10px!important;
  font-size:.68rem!important;
  line-height:1.1!important;
}
.smartstore-progress-overall .unified-schedule-header td{
  height:20px!important;
  min-height:20px!important;
  padding:2px 10px!important;
  font-size:.68rem!important;
  line-height:1.1!important;
}
.smartstore-progress-layout .unified-tt-card + .unified-tt-card[data-smart-group]{
  box-shadow:inset 0 1px 0 rgba(148,163,184,.55);
}
.smartstore-progress-overall .smartstore-overall-tail .unified-schedule-header:first-of-type td::before{
  content:'OVERALL CATEGORY — ';
  font-weight:800;
}
.dark .smartstore-progress-layout .unified-tt-card + .unified-tt-card[data-smart-group]{
  box-shadow:inset 0 1px 0 rgba(71,85,105,.8);
}

.smartstore-progress-layout{grid-template-columns:minmax(0,1fr)!important;}

/* Smart Store Overall: standalone group summary (Dates / Delays / Percentages).
   It is a sibling of Main/Subcategory activity cards and is hidden only by
   the Main Category double-click group action. */
.smartstore-progress-overall .smartstore-overall-summary {
  margin-top: 0;
  border-top: 3px solid rgba(28,100,183,.35);
}
.smartstore-progress-overall .smartstore-overall-summary .pb-table {
  margin: 0;
}

/* Smart Store Overall visibility contract:
   - the summary is independent from every activity/Subcategory card;
   - it stays visible while the category branch is open;
   - only a Main-header double click may fully hide it. */
.smartstore-progress-overall .smartstore-overall-summary.smartstore-summary-hidden,
.smartstore-progress-overall .tt2-block.smartstore-card-hidden {
  display:none!important;
}

/* Smart Store Individual: a Main-header double click fully closes the branch.
   Subcategory headers and their activity/percentage tables must disappear,
   while the Main header remains visible as the reopening control. */
.smartstore-progress-individual .tt2-block.smartstore-card-hidden {
  display:none!important;
}

/* TT3 Bus Bar aligned to the completed TT3 Bottom Rail standard. */
.asrs-busbar-phase .asrs-phase-title{flex:1 1 auto!important;min-width:0!important}
.asrs-busbar-combined{
  display:flex!important;
  flex-direction:column!important;
  margin:0 0 16px!important;
  padding:10px!important;
}
.asrs-busbar-combined .asrs-busbar-aisle-title{
  order:1!important;
  height:24px!important;
  min-height:24px!important;
  max-height:24px!important;
  padding:2px 10px!important;
  margin:0!important;
  box-sizing:border-box!important;
  cursor:pointer!important;
  font-size:.68rem!important;
}
.asrs-busbar-combined .asrs-busbar-aisle-title .asrs-live-percent{
  min-width:38px!important;
  max-width:46px!important;
  padding:2px 6px!important;
  font-size:.62rem!important;
  line-height:1.1!important;
  box-sizing:border-box!important;
}
.asrs-busbar-combined.aisle-collapsed>*:not(.asrs-busbar-aisle-title){display:none!important}
.asrs-busbar-combined .asrs-busbar-shared-schedule{
  order:3!important;
  grid-template-columns:repeat(9,minmax(118px,1fr))!important;
  gap:6px!important;
  padding:6px 10px 9px!important;
  margin:0!important;
  width:100%!important;
  box-sizing:border-box!important;
  align-items:center!important;
}
.asrs-busbar-combined .asrs-busbar-shared-schedule>label,
.asrs-busbar-combined .asrs-busbar-shared-schedule>span{
  min-height:40px!important;
  max-height:40px!important;
  padding:4px 6px!important;
  box-sizing:border-box!important;
  font-size:.72rem!important;
}
.asrs-busbar-combined .asrs-busbar-shared-schedule>label input{font-size:.72rem!important}
.asrs-busbar-combined .asrs-busbar-shared-schedule>span{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:6px!important;
  white-space:nowrap!important;
}
.asrs-busbar-combined .asrs-busbar-shared-schedule>span small,
.asrs-busbar-combined .asrs-busbar-shared-schedule>span b{
  display:inline!important;
  margin:0!important;
  font-size:.76rem!important;
  line-height:1.1!important;
}
.asrs-busbar-compact-controls{
  order:2!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  padding:6px 10px!important;
  margin:0!important;
}
.asrs-busbar-compact-controls .asrs-busbar-progress-line{
  display:grid!important;
  grid-template-columns:auto 104px 38px!important;
  gap:7px!important;
  align-items:center!important;
  width:auto!important;
  min-height:37px!important;
  padding:3px 6px!important;
  box-sizing:border-box!important;
}
.asrs-busbar-compact-controls .asrs-vt-vks-label{margin:0!important;white-space:nowrap!important;font-size:.68rem!important}
.asrs-busbar-compact-controls select{width:104px!important;min-width:104px!important;padding:3px 5px!important;font-size:.68rem!important;color:#000!important}
.asrs-busbar-compact-controls select option{color:#000!important}
.asrs-busbar-compact-controls .asrs-busbar-percent{width:38px!important;font-size:.68rem!important;text-align:right!important}

/* TT3 Individual / Overall Phase schedule control. */
.asrs-accordion-header .asrs-phase-title>.text-xs{
  display:block!important;
  margin-top:2px!important;
  line-height:1.05!important;
}
.asrs-phase-overall-panel{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(190px,1.25fr)) repeat(6,minmax(125px,.8fr))!important;
  gap:0!important;
  padding:0!important;
  margin:0!important;
  background:#eef6ff!important;
  border-top:1px solid rgba(96,165,250,.5)!important;
  border-bottom:1px solid rgba(148,163,184,.35)!important;
}
.asrs-phase-overall-panel>label,
.asrs-phase-overall-panel>span{
  min-height:40px!important;
  max-height:40px!important;
  padding:4px 7px!important;
  margin:0!important;
  border-right:1px solid rgba(148,163,184,.28)!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:6px!important;
  box-sizing:border-box!important;
  color:#475569!important;
  font-size:.68rem!important;
  white-space:nowrap!important;
}
.asrs-phase-overall-panel input{width:112px!important;min-width:112px!important;font-size:.7rem!important}
.asrs-phase-overall-panel small{display:inline!important;margin:0!important}
.asrs-phase-overall-panel b{display:inline!important;margin:0!important;color:#111827;font-size:.76rem!important}
.dark .asrs-phase-overall-panel{background:#172554!important}
.dark .asrs-phase-overall-panel>label,.dark .asrs-phase-overall-panel>span{color:#cbd5e1!important}
.dark .asrs-phase-overall-panel b{color:#f8fafc}
.asrs-busbar-phase.asrs-progress-overall .asrs-busbar-shared-schedule{display:none!important}
@media(max-width:1150px){.asrs-phase-overall-panel{grid-template-columns:repeat(2,minmax(190px,1fr)) repeat(3,minmax(125px,.8fr))!important}}
.presence-locked-editor,.presence-resource-editor{display:flex;align-items:center;justify-content:flex-start;gap:3px;width:100%;height:22px}.presence-locked-editor strong{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.presence-resource-editor .presence-resource-name{width:105px!important;min-width:80px!important;flex:1}.presence-resource-date{width:92px!important;min-width:92px!important;height:20px!important;font-size:.55rem!important;padding:0 2px!important;border:1px solid #cbd5e1!important;border-radius:3px!important;background:#fff!important}.presence-color-timing>td.presence-week-a,.presence-color-timing>td.presence-week-b{background:var(--activity-row-color,#f3f4f6)!important}.presence-color-timing td.activity-active-day{background:#bfdbfe!important}.presence-color-timing .presence-cell.presence-x,.presence-color-timing .presence-cell.presence-o,.presence-color-timing .presence-cell.presence-r,.presence-color-timing .presence-cell.presence-t,.presence-color-timing .presence-cell.presence-h{position:relative;z-index:2}
.presence-calendar-btn{width:23px;height:22px;min-width:23px;padding:0;border:1px solid #94a3b8;border-radius:4px;background:#fff;color:#334155;display:inline-flex;align-items:center;justify-content:center;font-size:13px;line-height:1;cursor:pointer}.presence-calendar-btn:hover,.presence-calendar-btn.has-dates{border-color:#0f766e;background:#ecfdf5}.presence-calendar-btn.has-dates{box-shadow:inset 0 -2px #0f766e}
.dual-date-picker{position:fixed;z-index:10000;width:548px;padding:0;background:#fff;border:1px solid #648b8c;border-radius:5px;box-shadow:0 14px 36px rgba(15,23,42,.25);color:#334155;font-size:12px;overflow:hidden}.dual-date-title{height:27px;display:grid;grid-template-columns:1fr 1fr 26px;align-items:center;text-align:center;background:#f8fafc;border-bottom:1px solid #94a3b8}.dual-date-title span{font-weight:500}.dual-date-title button{border:0;background:transparent;font-size:18px;cursor:pointer;color:#64748b}.dual-date-months{display:grid;grid-template-columns:1fr 1fr}.dual-date-month{padding:0 7px 7px}.dual-date-month:first-child{border-right:1px solid #cbd5e1}.dual-date-month header{height:27px;display:grid;grid-template-columns:25px 1fr 25px;align-items:center;background:#648b8c;color:#fff;margin:0 -7px 5px}.dual-date-month header strong{text-align:center;font-size:12px;font-weight:600}.dual-date-month header button{height:27px;border:0;background:transparent;color:#fff;font-size:20px;cursor:pointer}.dual-date-month header button[data-dual-nav="1"]{grid-column:3}.dual-date-weekdays,.dual-date-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:1px;text-align:center}.dual-date-weekdays b{height:21px;line-height:21px;font-weight:600;color:#475569}.dual-date-grid button,.dual-date-empty{height:25px;border:0;background:transparent;border-radius:3px;color:#334155;font-size:12px}.dual-date-grid button{cursor:pointer}.dual-date-grid button:hover{background:#dbeafe}.dual-date-grid button:nth-child(7n),.dual-date-grid button:nth-child(7n+6){color:#dc2626}.dual-date-grid .dual-date-range{background:#ecfdf5}.dual-date-grid .dual-date-selected{background:#ea6b4b!important;color:#fff!important;font-weight:700}.dual-date-picker footer{min-height:29px;display:flex;align-items:center;justify-content:space-between;padding:3px 8px;border-top:1px solid #cbd5e1;background:#f8fafc}.dual-date-picker footer span{font-variant-numeric:tabular-nums}.dual-date-picker footer button{border:1px solid #94a3b8;border-radius:4px;background:#fff;padding:2px 9px;cursor:pointer}.dark .dual-date-picker{background:#111827;color:#f8fafc}.dark .dual-date-title,.dark .dual-date-picker footer{background:#1f2937}.dark .dual-date-grid button{color:#e5e7eb}.dark .dual-date-weekdays b{color:#cbd5e1}
@media(max-width:620px){.dual-date-picker{left:8px!important;width:calc(100vw - 16px)}.dual-date-months{grid-template-columns:1fr}.dual-date-month:first-child{border-right:0;border-bottom:1px solid #cbd5e1}}
#presenceTable .presence-name-head,#presenceTable .presence-label-cell{width:360px!important}.presence-manual-activity .presence-label-cell,.presence-linked-activity .presence-label-cell{background:var(--activity-row-color,var(--manual-row-color,#e0f2fe))!important}
#presenceTable thead,#presenceTable thead tr,#presenceTable thead th{background-color:#fff!important;opacity:1!important;z-index:60!important;background-image:none!important}#presenceTable thead th.presence-week-a{background:#eaf2ff!important}#presenceTable thead th.presence-week-b{background:#ecfdf5!important}.dark #presenceTable thead,.dark #presenceTable thead tr,.dark #presenceTable thead th{background-color:#111827!important;color:#f8fafc!important}
#presenceTable thead th.presence-saturday{background:#f3f4f6!important}#presenceTable thead th.presence-sunday{background:#fee2e2!important}#presenceTable thead th.presence-holiday-us{background:#eff6ff!important}#presenceTable thead th.presence-holiday-mx{background:#f0fdf4!important}#presenceTable thead th.presence-day-current{background:#fb923c!important;color:#111827!important}
.presence-color-timing>td.presence-outside-before,.presence-color-timing>td.presence-outside-after{background:#fef3c7!important}.presence-color-timing>td.presence-saturday{background:#f3f4f6!important}.presence-color-timing>td.presence-sunday{background:#fee2e2!important}.presence-color-timing>td.presence-day-current{background:#fb923c!important}.presence-color-timing>td.presence-project-start{border-left:3px solid #dc2626!important}.presence-color-timing>td.presence-project-end{border-right:3px solid #dc2626!important}
.presence-tracker-marker{position:relative}.presence-tracker-marker::after{content:'🔒';position:absolute;right:1px;top:0;font-size:7px;line-height:1}.presence-activity-cell:disabled{opacity:1!important;cursor:not-allowed!important}
.presence-activity-cell.activity-x-early{background:#bbf7d0!important;color:#14532d!important}.presence-activity-cell.activity-x-planned{background:#EA580C!important;color:#fff!important}.presence-activity-cell.activity-x-late{background:#fecaca!important;color:#991b1b!important}.presence-tracker-delay{position:relative}
.presence-manual-activity .presence-activity-name{background:var(--manual-row-color,#e0f2fe)!important;color:#111827!important}.presence-empty-custom-row .presence-activity-name{background:var(--empty-row-color,#ffffff)!important;color:#111827!important}.presence-color-select{outline:0!important}
.presence-project-start{border-left:3px solid #dc2626!important}.presence-project-end{border-right:3px solid #dc2626!important}
.presence-row-selected .presence-outside-before,.presence-row-selected .presence-outside-after{background-color:#fef3c7!important}.presence-outside-before .presence-cell:not(.presence-empty),.presence-outside-after .presence-cell:not(.presence-empty){position:relative;z-index:1}
#presenceTable .presence-label-cell,#presenceTable .presence-activity-name,#presenceTable .presence-resource-name{text-align:left!important}.presence-manual-editor{justify-content:flex-start!important}.presence-activity-name,.presence-resource-name{line-height:20px!important;height:20px!important;max-height:20px!important}
#presenceTable .presence-name-head,#presenceTable .presence-label-cell{width:var(--presence-name-width,360px)!important;min-width:var(--presence-name-width,360px)!important;max-width:var(--presence-name-width,360px)!important;box-sizing:border-box!important}#presenceTable .presence-resource-editor,#presenceTable .presence-manual-editor,#presenceTable .presence-locked-editor{min-width:0!important;overflow:hidden!important}#presenceTable .presence-resource-name,#presenceTable .presence-activity-name,#presenceTable .presence-locked-editor strong{min-width:0!important;flex:1 1 auto!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.presence-number-head,.presence-row-number{width:31px!important;min-width:31px!important;max-width:31px!important;text-align:center!important;padding:2px!important;font-size:.58rem!important;font-weight:700!important;color:#475569!important;background:#f8fafc!important}.presence-summary-week th,.presence-summary-day th,.presence-summary-day td{height:22px!important;padding:2px 4px!important;text-align:center!important;border:1px solid #cbd5e1!important;font-size:.58rem!important}.presence-summary-week th{background:#dbeafe!important;color:#1e3a8a!important}.presence-summary-day th,.presence-summary-day td{background:#f8fafc!important;color:#334155!important}.presence-summary-week th:first-child,.presence-summary-day th:first-child{text-align:left!important;font-weight:700!important}.dark .presence-number-head,.dark .presence-row-number,.dark .presence-summary-day th,.dark .presence-summary-day td{background:#1f2937!important;color:#e5e7eb!important}.dark .presence-summary-week th{background:#1e3a8a!important;color:#eff6ff!important}
.presence-hide-leading-columns .presence-number-head,.presence-hide-leading-columns .presence-row-number,.presence-hide-leading-columns .presence-control-head,.presence-hide-leading-columns .presence-row-controls{display:none!important}.presence-leading-columns-toggle{white-space:nowrap;padding:3px 7px;border:1px solid #cbd5e1;border-radius:5px;background:#f8fafc}.presence-leading-columns-toggle input{margin:0}.resource-presence-name-setting{display:grid!important;grid-template-columns:auto auto;align-items:center;gap:2px 6px;font-size:.65rem;color:#475569}.resource-presence-name-setting small{grid-column:1/-1;font-size:.52rem;color:#94a3b8;line-height:1.1;white-space:nowrap}.resource-presence-name-setting .select-input{height:25px!important;padding:1px 22px 1px 5px!important;font-size:.62rem!important}.presence-resource-editor .presence-calendar-btn,.presence-manual-editor .presence-calendar-btn,.presence-resource-editor .presence-color-select,.presence-manual-editor .presence-color-select,.presence-locked-editor .presence-color-select{flex:0 0 auto!important}
#presenceTable .presence-label-cell{padding:1px 2px!important}#presenceTable .presence-resource-editor,#presenceTable .presence-manual-editor,#presenceTable .presence-locked-editor{gap:1px!important;height:20px!important}#presenceTable .presence-calendar-btn{width:18px!important;min-width:18px!important;height:18px!important;border-radius:3px!important;font-size:10px!important}#presenceTable .presence-color-select{width:18px!important;min-width:18px!important;max-width:18px!important;height:18px!important}#presenceTable .presence-resource-name,#presenceTable .presence-activity-name{height:18px!important;max-height:18px!important;line-height:18px!important;padding:0 2px!important;border-width:0!important}#presenceTable .presence-name-head{padding-left:3px!important;padding-right:3px!important;white-space:normal!important;line-height:1.05!important}
@keyframes resourceAttentionPulse{0%,100%{background:#fff1f2;box-shadow:0 0 0 1px #fca5a5;color:#b91c1c}50%{background:#fecaca;box-shadow:0 0 0 2px rgba(248,113,113,.24);color:#991b1b}}.nav-tab-sitelog.resources-attention{animation:resourceAttentionPulse 1s ease-in-out infinite!important;color:#b91c1c!important;border-bottom-color:#f87171!important;font-weight:800!important}.nav-tab-sitelog.resources-attention.active{animation:resourceAttentionPulse 1s ease-in-out infinite!important}.resource-required-blink{animation:resourceAttentionPulse 1s ease-in-out infinite!important;border-color:#f87171!important}.resource-name-required-blink{animation:resourceAttentionPulse 1s ease-in-out infinite!important;border-radius:3px!important;font-weight:700!important}.resource-delete-left{width:22px!important;min-width:22px!important;height:22px!important;padding:0!important}.sl-resources-table th:first-child,.sl-resources-table td:first-child{width:28px!important;min-width:28px!important;padding:2px!important;text-align:center!important}
#presenceTable .presence-activity-row>.presence-skill-cell,#presenceTable .presence-activity-row>.presence-total-presence-cell,#presenceTable .presence-activity-row>.pres-detail-col,#presenceTable .presence-activity-row>.pres-total-col,#presenceTable .presence-resource-row>.presence-skill-cell,#presenceTable .presence-resource-row>.presence-total-presence-cell,#presenceTable .presence-resource-row>.pres-detail-col,#presenceTable .presence-resource-row>.pres-total-col{background:var(--activity-row-color,#f3f4f6)!important}.presence-resource-row .pres-detail-col,.presence-resource-row .pres-total-col,.presence-resource-row .pres-detail-col select,.presence-resource-row .pres-total-col select{writing-mode:horizontal-tb!important;text-orientation:mixed!important;transform:none!important;white-space:nowrap!important}.pres-detail-col,.pres-total-col{writing-mode:horizontal-tb!important;text-orientation:mixed!important}
.presence-empty-divider-cell{height:24px!important;padding:1px 3px!important;background:var(--empty-row-color,#ffffff)!important;border-top:1px solid rgba(100,116,139,.35)!important;border-bottom:1px solid rgba(100,116,139,.35)!important}.presence-empty-divider-content{display:grid!important;grid-template-columns:repeat(var(--empty-repeat-count,1),minmax(0,1fr))!important;align-items:center!important;width:100%!important;height:20px!important;gap:0!important}.presence-empty-divider-edit,.presence-empty-divider-copy{display:flex;align-items:center;justify-content:center;min-width:0;height:20px;font-size:.61rem;font-weight:700;color:#334155;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.presence-empty-divider-edit{justify-content:flex-start;gap:2px}.presence-empty-divider-edit .presence-activity-name{flex:1 1 auto!important;min-width:24px!important;max-width:none!important;background:transparent!important;text-align:center!important;font-weight:700!important}.presence-empty-divider-edit .presence-color-select{flex:0 0 18px!important}.empty-row-setting-card label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.68rem;color:#475569}.empty-row-setting-card p{margin-top:8px;font-size:.58rem;line-height:1.35;color:#64748b}.empty-row-setting-card .select-input{height:26px!important;font-size:.63rem!important}.dark .presence-empty-divider-edit,.dark .presence-empty-divider-copy{color:#e5e7eb}
.presence-name-head{position:sticky!important}.presence-hide-system-bottom{position:absolute!important;left:3px!important;bottom:2px!important;display:block!important;margin:0!important;line-height:1!important}.presence-hide-system-bottom label{display:flex!important;align-items:center!important;gap:3px!important;margin:0!important;font-size:.5rem!important;font-weight:600!important}.presence-hide-system-bottom input{width:10px!important;height:10px!important;margin:0!important}#presenceTable .presence-name-head{padding-bottom:14px!important;text-align:left!important}
#presenceTable .presence-empty-divider-row>td{height:12px!important;min-height:12px!important;max-height:12px!important;padding-top:0!important;padding-bottom:0!important;line-height:10px!important}#presenceTable .presence-empty-divider-cell{height:12px!important;min-height:12px!important;max-height:12px!important;padding:0 2px!important}#presenceTable .presence-empty-divider-content,#presenceTable .presence-empty-divider-edit,#presenceTable .presence-empty-divider-copy{height:11px!important;min-height:11px!important;max-height:11px!important;line-height:11px!important;font-size:.46rem!important}#presenceTable .presence-empty-divider-edit .presence-activity-name{height:10px!important;max-height:10px!important;line-height:10px!important;padding:0 1px!important;font-size:.46rem!important}.presence-empty-row-controls{overflow:visible!important}.presence-empty-controls-wrap{height:12px!important;display:grid!important;grid-template-rows:6px 6px!important;align-items:center!important;justify-items:center!important}.presence-empty-controls-wrap>span{height:6px!important;display:flex!important;align-items:center!important;gap:1px!important}.presence-empty-controls-wrap .presence-drag-handle{height:6px!important;line-height:6px!important;font-size:5px!important;font-style:normal!important;cursor:grab}.presence-empty-controls-wrap button{width:11px!important;height:6px!important;min-height:6px!important;padding:0!important;margin:0!important;line-height:6px!important;font-size:4px!important;border-radius:1px!important}.presence-empty-controls-wrap .presence-color-select{width:12px!important;min-width:12px!important;max-width:12px!important;height:6px!important;min-height:6px!important;padding:0!important;border-radius:1px!important}
#presenceTable .presence-empty-divider-row>td,#presenceTable .presence-empty-divider-cell{height:7px!important;min-height:7px!important;max-height:7px!important;line-height:6px!important;padding-top:0!important;padding-bottom:0!important}#presenceTable .presence-empty-divider-content,#presenceTable .presence-empty-divider-edit,#presenceTable .presence-empty-divider-copy{height:6px!important;min-height:6px!important;max-height:6px!important;line-height:6px!important;font-size:4px!important}#presenceTable .presence-empty-divider-edit .presence-activity-name{height:6px!important;max-height:6px!important;line-height:6px!important;font-size:4px!important;padding:0 1px!important}.presence-empty-controls-wrap{height:7px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:1px!important}.presence-empty-controls-wrap .presence-drag-handle,.presence-empty-controls-wrap button,.presence-empty-controls-wrap .presence-color-select{height:6px!important;min-height:6px!important;line-height:6px!important;margin:0!important}.presence-empty-controls-wrap .presence-drag-handle{font-size:4px!important}.presence-empty-controls-wrap button{width:10px!important;font-size:4px!important}.presence-empty-controls-wrap .presence-color-select{width:10px!important;min-width:10px!important;max-width:10px!important}
.presence-header-codes{position:absolute!important;top:2px!important;left:50%!important;transform:translateX(-50%)!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:2px!important}.presence-header-codes .presence-chip{width:11px!important;height:11px!important;min-width:11px!important;padding:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;font-size:6px!important;line-height:11px!important;border-radius:2px!important}.presence-summary-week.presence-summary-resources th{background:#dcfce7!important;color:#14532d!important}.presence-summary-day.presence-summary-resources th,.presence-summary-day.presence-summary-resources td{background:#f0fdf4!important;color:#166534!important}#presenceTable thead th.presence-day-current{background:#fde047!important;color:#111827!important}
#presenceTable .presence-empty-divider-row>td,#presenceTable .presence-empty-divider-cell{height:12px!important;min-height:12px!important;max-height:12px!important;line-height:12px!important;padding-top:0!important;padding-bottom:0!important}#presenceTable .presence-empty-divider-content,#presenceTable .presence-empty-divider-edit,#presenceTable .presence-empty-divider-copy{height:11px!important;min-height:11px!important;max-height:11px!important;line-height:11px!important;font-size:.61rem!important}#presenceTable .presence-empty-divider-edit .presence-activity-name{height:11px!important;max-height:11px!important;line-height:11px!important;font-size:.61rem!important;padding:0 2px!important}.presence-empty-controls-wrap{height:11px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:1px!important}.presence-empty-controls-wrap .presence-drag-handle,.presence-empty-controls-wrap button,.presence-empty-controls-wrap .presence-color-select{height:10px!important;min-height:10px!important;line-height:10px!important;margin:0!important}.presence-empty-controls-wrap .presence-drag-handle{font-size:7px!important}.presence-empty-controls-wrap button{width:12px!important;font-size:5px!important}.presence-empty-controls-wrap .presence-color-select{width:11px!important;min-width:11px!important;max-width:11px!important}
#presenceTable .presence-empty-divider-row>td,#presenceTable .presence-empty-divider-cell{height:10px!important;min-height:10px!important;max-height:10px!important;line-height:10px!important;padding:0!important}#presenceTable .presence-empty-divider-content,#presenceTable .presence-empty-divider-edit,#presenceTable .presence-empty-divider-copy{height:9px!important;min-height:9px!important;max-height:9px!important;line-height:9px!important;font-size:.61rem!important}#presenceTable .presence-empty-divider-edit .presence-activity-name{height:9px!important;max-height:9px!important;line-height:9px!important;font-size:.61rem!important;padding:0 2px!important}.presence-empty-controls-wrap{height:9px!important;min-height:9px!important;max-height:9px!important}.presence-empty-controls-wrap .presence-drag-handle,.presence-empty-controls-wrap button,.presence-empty-controls-wrap .presence-color-select{width:11px!important;min-width:11px!important;max-width:11px!important;height:9px!important;min-height:9px!important;max-height:9px!important;line-height:9px!important;padding:0!important;margin:0!important;border-radius:1px!important}.presence-empty-controls-wrap button{font-size:5px!important}.presence-empty-controls-wrap .presence-color-select{font-size:0!important}
#presenceTable .presence-empty-divider-row{height:11px!important;min-height:11px!important;max-height:11px!important}#presenceTable .presence-empty-divider-row>td,#presenceTable .presence-empty-divider-cell{height:11px!important;min-height:11px!important;max-height:11px!important;line-height:10px!important;padding:0!important;box-sizing:border-box!important}#presenceTable .presence-empty-controls-wrap{height:9px!important;min-height:9px!important;max-height:9px!important}#presenceTable .presence-empty-controls-wrap .presence-drag-handle,#presenceTable .presence-empty-controls-wrap button,#presenceTable .presence-empty-controls-wrap .presence-color-select{width:11px!important;min-width:11px!important;max-width:11px!important;height:9px!important;min-height:9px!important;max-height:9px!important;line-height:9px!important;padding:0!important;margin:0!important;box-sizing:border-box!important}
#presenceTable .presence-empty-divider-row{height:12px!important}#presenceTable .presence-empty-divider-row>td{position:relative!important;height:12px!important;min-height:12px!important;max-height:12px!important;padding:0!important;line-height:12px!important;box-sizing:border-box!important;overflow:hidden!important}#presenceTable .presence-empty-divider-content{position:absolute!important;inset:0 2px!important;width:auto!important;height:12px!important;min-height:12px!important;max-height:12px!important;display:grid!important;align-items:center!important;overflow:hidden!important}#presenceTable .presence-empty-divider-edit,#presenceTable .presence-empty-divider-copy{height:12px!important;min-height:12px!important;max-height:12px!important;line-height:12px!important;font-size:.61rem!important}#presenceTable .presence-empty-divider-edit .presence-activity-name{height:12px!important;min-height:12px!important;max-height:12px!important;line-height:12px!important;font-size:.61rem!important;padding:0 2px!important;box-sizing:border-box!important}#presenceTable .presence-empty-row-controls{overflow:hidden!important}#presenceTable .presence-empty-controls-wrap{position:absolute!important;left:1px!important;right:1px!important;top:1px!important;height:10px!important;min-height:10px!important;max-height:10px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:1px!important}#presenceTable .presence-empty-controls-wrap .presence-drag-handle,#presenceTable .presence-empty-controls-wrap button,#presenceTable .presence-empty-controls-wrap .presence-color-select{width:11px!important;min-width:11px!important;max-width:11px!important;height:10px!important;min-height:10px!important;max-height:10px!important;line-height:10px!important;padding:0!important;margin:0!important;box-sizing:border-box!important}
#presenceTable .presence-empty-controls-wrap .presence-color-select{width:11px!important;min-width:11px!important;max-width:11px!important;height:9px!important;min-height:9px!important;max-height:9px!important;line-height:9px!important}

/* Empty Row: metà dell'altezza standard Presence (28px -> 14px).
   Il contenuto resta nel normale flusso e centrato verticalmente. */
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index]{height:14px!important;min-height:14px!important;max-height:14px!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index]>td{position:static!important;height:14px!important;min-height:14px!important;max-height:14px!important;padding:0!important;line-height:14px!important;vertical-align:middle!important;overflow:hidden!important;box-sizing:border-box!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-divider-content{position:static!important;inset:auto!important;width:100%!important;height:13px!important;min-height:13px!important;max-height:13px!important;align-items:center!important;overflow:hidden!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-divider-edit,#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-divider-copy{height:13px!important;min-height:13px!important;max-height:13px!important;line-height:13px!important;align-items:center!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-divider-edit .presence-activity-name{height:13px!important;min-height:13px!important;max-height:13px!important;line-height:13px!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-controls-wrap{position:static!important;inset:auto!important;height:10px!important;min-height:10px!important;max-height:10px!important;margin:auto!important;align-items:center!important}

/* Empty Row controls: colore sotto ai comandi, con angoli arrotondati. */
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-controls-wrap{height:13px!important;min-height:13px!important;max-height:13px!important;display:grid!important;grid-template-rows:7px 6px!important;align-content:center!important;justify-items:center!important;gap:0!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-actions-row{height:7px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:1px!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-color-row{height:6px!important;display:flex!important;align-items:center!important;justify-content:center!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-actions-row .presence-drag-handle,#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-actions-row button{height:7px!important;min-height:7px!important;max-height:7px!important;line-height:7px!important;border-radius:2px!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-color-row .presence-color-select{width:12px!important;min-width:12px!important;max-width:12px!important;height:6px!important;min-height:6px!important;max-height:6px!important;line-height:6px!important;margin:0!important;border-radius:3px!important}

/* Presence refinements: current day/week, compact legend and toolbar controls. */
#presenceTable thead th.pres-day-head.presence-day-current{background:#ffef00!important;color:#111827!important}
#presenceTable .presence-week-header.presence-week-current{animation:none!important;color:inherit!important;font-weight:900!important;box-shadow:inset 0 0 0 3px #facc15!important}
#presenceTable .presence-week-header.presence-week-current.presence-week-a{background:#eaf2ff!important}
#presenceTable .presence-week-header.presence-week-current.presence-week-b{background:#ecfdf5!important}
#presenceTable .pres-day-head.presence-current-week:not(.presence-day-current),#presenceTable tbody td.presence-current-week:not(.presence-day-current){background-color:transparent!important}
#presenceTable tbody td.presence-day-current{position:relative!important;background-color:transparent!important;box-shadow:inset 2px 0 #facc15,inset -2px 0 #facc15!important}
#presenceTable tbody td.presence-day-current::after{content:""!important;position:absolute!important;inset:0!important;z-index:3!important;pointer-events:none!important;background:transparent!important}
#presenceTable tbody tr:last-child td.presence-day-current{box-shadow:inset 2px 0 #facc15,inset -2px 0 #facc15,inset 0 -2px #facc15!important}
#presenceTable .presence-header-codes{top:2px!important;gap:3px!important}
#presenceTable .presence-header-codes .presence-chip{width:20px!important;min-width:20px!important;height:20px!important;padding:0!important;margin:0!important;font-size:.68rem!important;line-height:20px!important;border-radius:5px!important}
#clearTrackerColorsBtn.presence-reset-colors-btn{height:26px!important;min-height:26px!important;background:#2563eb!important;color:#fff!important;border-color:#1d4ed8!important}
#togglePresenceDetailsBtn.presence-details-skill-align{height:26px!important;min-height:26px!important}
#presenceTable .pres-day-head.presence-current-week.presence-saturday:not(.presence-day-current){background:#d1d5db!important;color:#111827!important}
#presenceTable .pres-day-head.presence-current-week.presence-sunday:not(.presence-day-current){background:#fecaca!important;color:#7f1d1d!important}
#presenceTable .pres-day-head.presence-current-week.presence-holiday-us:not(.presence-day-current){background:#fff!important}
#presenceTable .pres-day-head.presence-current-week.presence-holiday-mx:not(.presence-day-current){background:#fff!important}
#presenceTable tbody td.presence-current-week.presence-saturday:not(.presence-day-current){background:#f8fafc!important}
#presenceTable tbody td.presence-current-week.presence-sunday:not(.presence-day-current){background:#fff1f2!important}
#presenceTable tbody td.presence-current-week.presence-holiday-us:not(.presence-day-current){background:#eff6ff!important}
#presenceTable tbody td.presence-current-week.presence-holiday-mx:not(.presence-day-current){background:#f0fdf4!important}
#presenceTable .presence-activity-cell[data-tracker-locked="1"]{cursor:not-allowed!important;opacity:1!important}

/* Presence controls: row creation inside System / Resources. */
.presence-toolbar-left .presence-leading-columns-toggle{margin-top:6px!important;align-self:flex-end!important}
#presenceTable .presence-name-head{position:sticky!important;padding-bottom:43px!important}
#presenceTable .presence-system-row-actions{position:absolute!important;left:3px!important;bottom:2px!important;display:grid!important;grid-template-columns:max-content!important;grid-template-rows:14px 14px 12px!important;align-items:center!important;justify-items:start!important;gap:1px!important;z-index:2!important}
#presenceTable .presence-system-row-actions button{height:14px!important;min-height:14px!important;line-height:12px!important;padding:0 5px!important;margin:0!important;border:1px solid #cbd5e1!important;border-radius:3px!important;background:#f1f5f9!important;color:#334155!important;font-size:.48rem!important;font-weight:700!important;white-space:nowrap!important}
#presenceTable .presence-system-row-actions button:first-child{background:#fff7ed!important;border-color:#fdba74!important;color:#9a3412!important}
#presenceTable .presence-system-row-actions label{height:12px!important;display:flex!important;align-items:center!important;gap:3px!important;margin:0!important;font-size:.5rem!important;font-weight:600!important;white-space:nowrap!important}
#presenceTable .presence-system-row-actions input{width:10px!important;height:10px!important;margin:0!important}

/* Presence alignment refinements. */
#presenceTable thead th.pres-detail-col,#presenceTable thead th.pres-total-col{writing-mode:vertical-rl!important;text-orientation:mixed!important;transform:rotate(180deg)!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;line-height:1.05!important;text-align:center!important;vertical-align:middle!important}
#presenceTable tbody td.pres-detail-col,#presenceTable tbody td.pres-total-col{writing-mode:horizontal-tb!important;text-orientation:mixed!important;transform:none!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important}
#presenceTable tfoot td.pres-total-col,#presenceTable tfoot th.pres-total-col{writing-mode:horizontal-tb!important;text-orientation:mixed!important;transform:none!important;direction:ltr!important;unicode-bidi:normal!important;white-space:normal!important;text-align:center!important;vertical-align:middle!important}
.presence-toolbar-left{align-items:center!important}
.presence-toolbar-left>button,.presence-toolbar-left>label{height:26px!important;min-height:26px!important;box-sizing:border-box!important;align-items:center!important;justify-content:center!important;margin-top:0!important;margin-bottom:0!important}
.presence-toolbar-left .select-input{height:26px!important;min-height:26px!important;box-sizing:border-box!important}
.presence-toolbar-left .presence-leading-columns-toggle{margin-top:0!important;align-self:center!important}
#presenceTable .presence-week-header.presence-week-current{font-weight:400!important}
#presenceTable .presence-system-row-actions{grid-template-rows:17px 17px 12px!important;gap:2px!important}
#presenceTable .presence-system-row-actions button{width:82px!important;min-width:82px!important;max-width:82px!important;height:17px!important;min-height:17px!important;line-height:15px!important;padding:0 4px!important;font-size:.52rem!important;text-align:center!important}
#presenceTable .presence-total-presence-head,#presenceTable .presence-total-presence-cell{width:34px!important;min-width:34px!important;max-width:34px!important;text-align:center!important}

/* Presence title filters and week navigation alignment. */
.presence-title-filters-group{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important}
.presence-title-filters-group h2{margin-right:4px!important;white-space:nowrap!important}
.presence-title-filters-group label{height:26px!important;display:flex!important;align-items:center!important;gap:4px!important;font-size:.64rem!important;font-weight:600!important;color:#475569!important;white-space:nowrap!important}
.presence-title-filters-group .select-input{height:26px!important;min-height:26px!important;padding-top:1px!important;padding-bottom:1px!important;font-size:.68rem!important;line-height:1.1!important;box-sizing:border-box!important}
.presence-title-filters-group #presenceWeeksSelect{width:52px!important;min-width:52px!important}
.presence-title-filters-group #presenceTrackFilter{width:126px!important;min-width:126px!important}
.presence-title-filters-group #presenceSystemFilter{width:132px!important;min-width:132px!important}
.presence-week-nav>button{height:26px!important;min-height:26px!important;box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding-top:0!important;padding-bottom:0!important}
.presence-week-nav #presPrevWeek,.presence-week-nav #presNextWeek{width:30px!important;min-width:30px!important;padding-left:0!important;padding-right:0!important;font-size:.78rem!important}
.presence-week-nav #presTodayWeek{min-width:76px!important;font-size:.68rem!important}

/* Current week weight, details alignment and opaque compact date headers. */
#presenceTable .presence-week-header.presence-week-current{font-weight:800!important}
#slview-presence .presence-toolbar{position:relative!important}
#togglePresenceDetailsBtn.presence-details-skill-align{position:absolute!important;left:calc(var(--presence-leading-width,113px) + var(--presence-name-width,360px) - 14px)!important;top:50%!important;transform:translateY(-50%)!important;width:96px!important;min-width:96px!important;z-index:5!important}
#presenceTable thead,#presenceTable thead tr,#presenceTable thead th{opacity:1!important;background-clip:border-box!important}
#presenceTable thead th.pres-day-head{height:82px!important;min-height:82px!important;background-color:#fff!important;border:1px solid #cbd5e1!important;box-shadow:inset 0 0 0 1px #e2e8f0!important}
#presenceTable thead th.pres-day-head.presence-current-week:not(.presence-day-current){background-color:#fff!important}
#presenceTable thead th.pres-day-head.presence-day-current{background-color:#ffef00!important}
#presenceTable .pres-day-vertical{min-height:38px!important}
#presenceTable .pres-holiday-flag{top:2px!important}
#presenceTable .pres-day-head.presence-holiday-us:not(.presence-day-current),#presenceTable .pres-day-head.presence-holiday-mx:not(.presence-day-current){padding-top:14px!important}

/* Presence header controls: resource action, centered title and inline weeks. */
#presenceTable .presence-name-head{padding-bottom:72px!important}
#presenceTable .presence-system-row-actions{grid-template-rows:17px 17px 17px 12px!important;gap:2px!important}
#presenceTable .presence-system-row-actions button:first-child{background:#dcfce7!important;border-color:#86efac!important;color:#166534!important}
#presenceTable .presence-system-row-actions button:nth-child(2){background:#fff7ed!important;border-color:#fdba74!important;color:#9a3412!important}
.presence-week-center{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:3px!important;min-width:0!important}
.presence-week-center h2{margin:0!important;text-align:center!important;white-space:nowrap!important;line-height:1!important}
.presence-week-center .presence-week-nav{display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important}
.presence-weeks-inline{height:26px!important;display:flex!important;align-items:center!important;gap:4px!important;font-size:.64rem!important;font-weight:600!important;color:#475569!important;white-space:nowrap!important}
.presence-weeks-inline .select-input{width:52px!important;min-width:52px!important;height:26px!important;min-height:26px!important;padding-top:1px!important;padding-bottom:1px!important;font-size:.68rem!important;box-sizing:border-box!important}
#presenceTable .presence-header-codes .presence-chip{cursor:help!important}

/* Presence top alignment, opaque date borders and System / Resources title. */
#slview-presence .presence-title-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;align-items:center!important;gap:10px!important}
#slview-presence .presence-title-filters-group{justify-self:start!important}
#slview-presence .presence-page-title{justify-self:center!important;margin:0!important;text-align:center!important;white-space:nowrap!important;line-height:26px!important}
#slview-presence .presence-title-spacer{justify-self:end!important;width:1px!important;height:26px!important}
#slview-presence .presence-toolbar{min-height:26px!important;align-items:center!important}
#slview-presence .presence-toolbar-left,#slview-presence .presence-week-center,#slview-presence .presence-week-nav{height:26px!important;align-self:center!important;align-items:center!important}
#slview-presence #togglePresenceDetailsBtn.presence-details-skill-align{top:50%!important;bottom:auto!important;transform:translateY(-50%)!important}
#presenceTable .pres-holiday-flag{top:9px!important}
#presenceTable thead th.pres-day-head{box-shadow:inset 0 0 0 2px #111827!important}
#presenceTable thead th.pres-day-head.presence-saturday{box-shadow:inset 0 0 0 2px #9ca3af!important}
#presenceTable thead th.pres-day-head.presence-sunday{box-shadow:inset 0 0 0 2px #ef4444!important}
#presenceTable .presence-system-title{position:absolute!important;top:26px!important;left:0!important;width:100%!important;display:block!important;text-align:center!important;font-size:.58rem!important;font-weight:700!important;line-height:14px!important;white-space:nowrap!important}

/* Tracker-forced X: solid status border over the existing light fill. */
#presenceTable .presence-activity-cell[data-tracker-locked="1"].activity-x-early,#presenceTable .presence-activity-cell[data-tracker-locked="1"].activity-x-planned{border:2px solid #16a34a!important;box-sizing:border-box!important}
#presenceTable .presence-activity-cell[data-tracker-locked="1"].activity-x-late{border:2px solid #dc2626!important;box-sizing:border-box!important}

/* Presence header centering, compact Tracker borders and row-action layout. */
#presenceTable .presence-control-head{vertical-align:middle!important;text-align:center!important}
#presenceTable .presence-control-legend{width:100%!important;height:100%!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:1px!important;text-align:center!important;line-height:1.15!important}
#presenceTable td.activity-active-day{outline:none!important;box-shadow:none!important}
#presenceTable td.activity-active-day .presence-activity-cell{border:3px solid #000!important;box-sizing:border-box!important}
#presenceTable td.activity-active-day .presence-activity-cell[data-tracker-locked="1"].activity-x-early,#presenceTable td.activity-active-day .presence-activity-cell[data-tracker-locked="1"].activity-x-planned{border:2px solid #16a34a!important}
#presenceTable td.activity-active-day .presence-activity-cell[data-tracker-locked="1"].activity-x-late{border:2px solid #dc2626!important}
#presenceTable{border-collapse:separate!important;border-spacing:0!important}
#presenceTable thead{isolation:isolate!important;background:#fff!important;z-index:80!important}
#presenceTable thead tr{background:#fff!important;z-index:80!important}
#presenceTable thead th{opacity:1!important;background-clip:border-box!important;z-index:81!important}
#presenceTable .presence-name-head{padding-bottom:54px!important}
#presenceTable .presence-system-row-actions{grid-template-columns:72px 72px!important;grid-template-rows:17px 17px 12px!important;gap:2px!important;justify-items:center!important}
#presenceTable .presence-system-row-actions button{width:72px!important;min-width:72px!important;max-width:72px!important}
#presenceTable .presence-system-row-actions button:nth-child(1){grid-column:1!important;grid-row:1!important;background:#fff7ed!important;border-color:#fdba74!important;color:#9a3412!important}
#presenceTable .presence-system-row-actions button:nth-child(2){grid-column:2!important;grid-row:1!important;background:#f1f5f9!important;border-color:#cbd5e1!important;color:#334155!important}
#presenceTable .presence-system-row-actions button:nth-child(3){grid-column:1/3!important;grid-row:2!important;justify-self:center!important;background:#dcfce7!important;border-color:#86efac!important;color:#166534!important}
#presenceTable .presence-system-row-actions label{grid-column:1/3!important;grid-row:3!important;justify-self:start!important}

/* Presence 3-second cell cycle, compact action grid and neutral date headers. */
#presenceTable thead th.pres-day-head,#presenceTable thead th.pres-day-head.presence-saturday,#presenceTable thead th.pres-day-head.presence-sunday{box-shadow:none!important}
#presenceTable .pres-day-head.presence-holiday-us:not(.presence-day-current){box-shadow:inset 0 0 0 2px #2563eb!important}
#presenceTable .pres-day-head.presence-holiday-mx:not(.presence-day-current){box-shadow:inset 0 0 0 2px #16a34a!important}
#presenceTable .pres-day-head.presence-holiday-us.presence-holiday-mx:not(.presence-day-current){box-shadow:inset 2px 0 0 #2563eb,inset -2px 0 0 #16a34a,inset 0 2px 0 #7c3aed,inset 0 -2px 0 #7c3aed!important}
#presenceTable .pres-day-head.presence-day-current.presence-holiday-us{box-shadow:inset 0 0 0 2px #2563eb!important}
#presenceTable .pres-day-head.presence-day-current.presence-holiday-mx{box-shadow:inset 0 0 0 2px #16a34a!important}
#presenceTable .pres-day-head.presence-day-current.presence-holiday-us.presence-holiday-mx{box-shadow:inset 2px 0 0 #2563eb,inset -2px 0 0 #16a34a,inset 0 2px 0 #7c3aed,inset 0 -2px 0 #7c3aed!important}
#presenceTable .presence-name-head{padding-bottom:40px!important}
#presenceTable .presence-system-row-actions{grid-template-columns:72px 72px!important;grid-template-rows:17px 17px!important;gap:3px!important}
#presenceTable .presence-system-row-actions button:nth-child(1){grid-column:1!important;grid-row:2!important;background:#fff7ed!important;border-color:#fdba74!important;color:#9a3412!important}
#presenceTable .presence-system-row-actions button:nth-child(2){grid-column:2!important;grid-row:2!important;background:#f1f5f9!important;border-color:#cbd5e1!important;color:#334155!important}
#presenceTable .presence-system-row-actions button:nth-child(3){grid-column:1!important;grid-row:1!important;justify-self:center!important;background:#dcfce7!important;border-color:#86efac!important;color:#166534!important}
#presenceTable .presence-system-row-actions label{grid-column:2!important;grid-row:1!important;justify-self:center!important;height:17px!important}
#togglePresenceDetailsBtn .presence-details-arrow{font-weight:900!important;font-size:.85rem!important;line-height:1!important}

/* Presence action spacing and clean Tracker start/finish markers. */
#presenceTable .presence-system-row-actions{left:3px!important;grid-template-columns:82px 82px!important;column-gap:10px!important;row-gap:3px!important;justify-items:start!important}
#presenceTable .presence-system-row-actions button{width:82px!important;min-width:82px!important;max-width:82px!important}
#presenceTable .presence-system-row-actions label{width:82px!important;min-width:82px!important;max-width:82px!important;height:17px!important;padding:0 4px!important;box-sizing:border-box!important;border:1px solid #cbd5e1!important;border-radius:3px!important;background:transparent!important;color:#334155!important;justify-content:center!important}
#presenceTable td.activity-active-day .presence-activity-cell{border-width:2px!important}
#presenceTable .presence-tracker-marker::after{content:none!important;display:none!important}
#presenceTable td.presence-tracker-marker{background:var(--activity-row-color,#fff)!important}

/* Final Empty Row controls, darker palette and automatic numbering. */
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-controls-wrap{width:55px!important;min-width:55px!important;max-width:55px!important;grid-template-rows:7px 6px!important;justify-items:stretch!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-actions-row{width:55px!important;display:grid!important;grid-template-columns:repeat(4,13px)!important;gap:1px!important;justify-content:start!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-actions-row .presence-drag-handle,#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-actions-row button{width:13px!important;min-width:13px!important;max-width:13px!important;height:7px!important;min-height:7px!important;max-height:7px!important;padding:0!important;margin:0!important;box-sizing:border-box!important;text-align:center!important;border-radius:2px!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-color-row{width:55px!important;display:grid!important;grid-template-columns:repeat(4,13px)!important;gap:1px!important;justify-content:start!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-color-row .presence-color-select{grid-column:4!important;width:13px!important;min-width:13px!important;max-width:13px!important;height:6px!important;min-height:6px!important;max-height:6px!important;padding:0!important;margin:0!important;border-radius:2px!important;box-sizing:border-box!important}
#presenceTable .presence-empty-divider-number{flex:0 0 13px!important;width:13px!important;height:11px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;margin-left:1px!important;border:1px solid rgba(15,23,42,.45)!important;border-radius:2px!important;background:rgba(255,255,255,.48)!important;color:#111827!important;font-size:.52rem!important;font-weight:900!important;line-height:1!important;box-sizing:border-box!important}
#presenceTable .presence-empty-divider-edit .presence-activity-name{color:#111827!important}

/* Empty Row final alignment: no numbering, color below +R, unified controls. */
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-color-row .presence-color-select{grid-column:3!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-actions-row .presence-drag-handle{display:inline-flex!important;align-items:center!important;justify-content:center!important;border:1px solid #cbd5e1!important;background:#e2e8f0!important;color:#334155!important;font-style:normal!important;line-height:7px!important;cursor:grab!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-actions-row button{display:inline-flex!important;align-items:center!important;justify-content:center!important;border:1px solid #cbd5e1!important;background:#e2e8f0!important;color:#334155!important;line-height:7px!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index]>td{border-top:1px solid #111827!important;border-bottom:1px solid #111827!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index]>td:first-child{border-left:1px solid #111827!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index]>td:last-child{border-right:1px solid #111827!important}

/* Empty Row controls match normal row widths; color aligns with row color selectors. */
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-controls-wrap{width:78px!important;min-width:78px!important;max-width:78px!important;height:13px!important;min-height:13px!important;max-height:13px!important;display:flex!important;align-items:center!important;justify-content:center!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-actions-row{width:78px!important;height:13px!important;display:grid!important;grid-template-columns:repeat(4,18px)!important;gap:2px!important;align-items:center!important;justify-content:center!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-actions-row .presence-drag-handle,#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-actions-row button{width:18px!important;min-width:18px!important;max-width:18px!important;height:11px!important;min-height:11px!important;max-height:11px!important;line-height:11px!important;font-size:6px!important;border-radius:3px!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-divider-edit{position:relative!important;padding-right:22px!important;box-sizing:border-box!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-inline-color{position:absolute!important;left:calc(var(--presence-name-width,180px) - 20px)!important;top:1px!important;width:18px!important;min-width:18px!important;max-width:18px!important;height:11px!important;min-height:11px!important;max-height:11px!important;margin:0!important;padding:0!important;border-radius:3px!important;box-sizing:border-box!important}

/* Empty Row final button colors and color-selector alignment. */
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-actions-row button[data-pres-add-a]{background:#fecaca!important;border-color:#fca5a5!important;color:#991b1b!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-inline-color{left:calc(var(--presence-name-width,180px) - 20px)!important;top:0!important;height:12px!important;min-height:12px!important;max-height:12px!important;background-color:#fff}

/* Universal row-control borders and neutral Empty Row color button. */
#presenceTable tbody .presence-row-controls .presence-drag-handle,#presenceTable tbody .presence-row-controls button{border:1px solid #111827!important;box-sizing:border-box!important}
#presenceTable tbody .presence-empty-inline-color{background:#fff!important;background-color:#fff!important;color:#111827!important}

/* Empty Row controls: black hairline borders and blank white color button. */
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-actions-row .presence-drag-handle,#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-actions-row button{border:1px solid #111827!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-inline-color{background:#fff!important;background-color:#fff!important;color:transparent!important;font-size:0!important;border:1px solid #111827!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-inline-color option{font-size:12px!important;color:#111827!important}

/* Presence color visibility controls. */
.presence-row-color-toggles{position:absolute!important;left:calc(var(--presence-leading-width,113px) + var(--presence-name-width,180px) + 88px)!important;top:50%!important;transform:translateY(-50%)!important;height:26px!important;display:flex!important;align-items:center!important;gap:6px!important;z-index:5!important;white-space:nowrap!important}
.presence-row-color-toggles label{height:26px!important;display:inline-flex!important;align-items:center!important;gap:3px!important;padding:0 5px!important;border:1px solid #cbd5e1!important;border-radius:4px!important;background:#fff!important;color:#334155!important;font-size:.56rem!important;font-weight:600!important;box-sizing:border-box!important}
.presence-row-color-toggles input{width:11px!important;height:11px!important;margin:0!important}
#presenceTable.presence-show-row-colors .presence-activity-row>td:not(.presence-row-number):not(.presence-row-controls):not(:has(> .presence-cell)),#presenceTable.presence-show-row-colors .presence-resource-row>td:not(.presence-row-number):not(.presence-row-controls):not(:has(> .presence-cell)){background:var(--activity-row-color,#fff)!important}
#presenceTable.presence-hide-colors .presence-activity-row>.presence-label-cell,#presenceTable.presence-hide-colors .presence-resource-row>.presence-label-cell{background:#fff!important;background-color:#fff!important}
#presenceTable.presence-hide-colors .presence-activity-row>.presence-label-cell .presence-color-select,#presenceTable.presence-hide-colors .presence-resource-row>.presence-label-cell .presence-color-select{display:none!important}

/* 24/07 fix (point 1, new batch): the swatch button must show the actual
   selected row color (as presenceColorOptions() already intends via its own
   inline `style="background:..."`), not a permanent neutral rainbow icon --
   the rainbow only shows now while no color has been chosen yet (falls back
   naturally since the select's own inline background wins once row_color is set). */
#presenceTable .presence-activity-row .presence-color-select,
#presenceTable .presence-resource-row .presence-color-select{
  color:transparent!important;
  font-size:0!important;
  border:1px solid #111827!important;
}
#presenceTable .presence-activity-row .presence-color-select option,
#presenceTable .presence-resource-row .presence-color-select option{
  color:#111827!important;
  font-size:12px!important;
}

/* Dual calendar weekend identity: Saturday blue, Sunday red. */
.dual-date-weekdays b:nth-child(6),
.dual-date-grid>*:nth-child(7n+6){color:#2563eb!important;font-weight:700!important}
.dual-date-weekdays b:nth-child(7),
.dual-date-grid>*:nth-child(7n){color:#dc2626!important;font-weight:700!important}

/* Hide Colors has final priority over row colors and rainbow controls. */
#presenceTable.presence-hide-colors .presence-activity-row>.presence-label-cell,
#presenceTable.presence-hide-colors .presence-resource-row>.presence-label-cell,
#presenceTable.presence-hide-colors .presence-activity-row>.presence-label-cell input,
#presenceTable.presence-hide-colors .presence-resource-row>.presence-label-cell input{
  background:#fff!important;
  background-color:#fff!important;
  background-image:none!important;
}
#presenceTable.presence-hide-colors .presence-activity-row .presence-color-select,
#presenceTable.presence-hide-colors .presence-resource-row .presence-color-select{
  display:none!important;
}

/* Hide custom row colors across Activities/Resources, while preserving all
   operational Presence marks and calendar warnings. */
#presenceTable.presence-hide-colors .presence-activity-row>td:not(.presence-row-number):not(.presence-row-controls):not(.presence-saturday):not(.presence-sunday):not(.presence-holiday-us):not(.presence-holiday-mx):not(.presence-day-current):not(.presence-outside-before):not(.presence-outside-after):not(.presence-x):not(.presence-o):not(.presence-r):not(.presence-t):not(.presence-h),
#presenceTable.presence-hide-colors .presence-resource-row>td:not(.presence-row-number):not(.presence-row-controls):not(.presence-saturday):not(.presence-sunday):not(.presence-holiday-us):not(.presence-holiday-mx):not(.presence-day-current):not(.presence-outside-before):not(.presence-outside-after):not(.presence-x):not(.presence-o):not(.presence-r):not(.presence-t):not(.presence-h){
  background:#fff!important;
  background-color:#fff!important;
  background-image:none!important;
}

/* Reset Colors follows Show Row Colors and matches its dimensions. */
.presence-row-color-toggles label:nth-child(2),
.presence-row-color-toggles .presence-reset-colors-btn{width:96px!important;min-width:96px!important;max-width:96px!important;height:26px!important;min-height:26px!important;box-sizing:border-box!important}
.presence-row-color-toggles .presence-reset-colors-btn{padding:0 5px!important;border:1px solid #1d4ed8!important;border-radius:4px!important;background:#2563eb!important;color:#fff!important;font-size:.56rem!important;font-weight:700!important;line-height:24px!important;white-space:nowrap!important;cursor:pointer!important}

/* Project-range warning: forced orange columns and vertical boundary labels. */
#presenceTable thead th.presence-outside-before,
#presenceTable thead th.presence-outside-after{background:#fb923c!important;background-color:#fb923c!important;color:#111827!important}
#presenceTable tbody td.presence-outside-before,
#presenceTable tbody td.presence-outside-after{background:#ffedd5!important;background-color:#ffedd5!important}
#presenceTable tbody td.presence-outside-label-cell{position:relative!important;overflow:visible!important}
#presenceTable tbody .presence-outside-range-label{position:absolute!important;left:50%!important;top:50%!important;z-index:12!important;writing-mode:vertical-rl!important;transform:translate(-50%,-50%) rotate(180deg)!important;font-size:.62rem!important;font-weight:900!important;line-height:1!important;letter-spacing:.25px!important;color:#7c2d12!important;text-shadow:0 1px rgba(255,255,255,.8)!important;white-space:nowrap!important;pointer-events:none!important}

/* ===== Presence — unified Project Timeline (TT2/TT3/TT4 + manual activities) ===== */
.presence-timeline-card{margin-bottom:0}
.presence-timeline-dates{display:flex;gap:14px;align-items:flex-end;flex-wrap:wrap}
.presence-timeline-dates label{display:flex;flex-direction:column;gap:2px;font-size:.7rem;color:#6b7280}
.presence-timeline-dates input{margin-top:2px}
.presence-timeline-chart{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.presence-timeline-axis{display:flex;justify-content:space-between;font-size:.68rem;color:#9ca3af;font-weight:600;padding:0 2px 4px 132px}
.presence-timeline-row{display:flex;align-items:center;gap:10px}
.presence-timeline-label{flex:0 0 120px;font-size:.72rem;font-weight:600;color:#374151;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dark .presence-timeline-label{color:#d1d5db}
.presence-timeline-track{flex:1;position:relative;height:16px;background:#f3f4f6;border-radius:5px}
.dark .presence-timeline-track{background:#1f2937}
.presence-timeline-bar{position:absolute;top:2px;bottom:2px;border-radius:4px;min-width:6px;box-shadow:0 1px 2px rgba(0,0,0,.15)}
.presence-timeline-empty{font-size:.8rem;color:#9ca3af;padding:8px 2px}

/* ============================================================
   SITE ACCESS — Manage Access modal (elegant, multi-user)
   ============================================================ */
.access-modal-card{width:460px;max-width:92vw;max-height:82vh;display:flex;flex-direction:column;padding:26px 28px 24px}
.access-modal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}
.access-modal-subtitle{font-size:.8rem;color:#6b7280;margin-top:2px;font-weight:600;letter-spacing:.01em}
.access-modal-close{width:30px;height:30px;flex:0 0 auto;border:none;background:rgba(0,0,0,0.04);border-radius:999px;font-size:1.1rem;line-height:1;color:#52525b;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s,color .15s}
.access-modal-close:hover{background:rgba(220,38,38,0.1);color:#dc2626}

.access-user-list{display:flex;flex-direction:column;gap:8px;overflow-y:auto;max-height:280px;padding-right:2px;margin-bottom:18px}
.access-user-list:empty{display:none}
.access-user-card{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:14px;border:1px solid rgba(0,0,0,0.06);background:linear-gradient(180deg,rgba(0,176,80,0.03),rgba(0,102,204,0.02));transition:box-shadow .15s,transform .15s}
.access-user-card:hover{box-shadow:0 4px 14px rgba(0,0,0,0.08);transform:translateY(-1px)}
.access-avatar{width:36px;height:36px;flex:0 0 auto;border-radius:999px;background:linear-gradient(135deg,#00B050,#0066CC);color:#fff;font-weight:800;font-size:.82rem;display:flex;align-items:center;justify-content:center;letter-spacing:0;box-shadow:0 2px 6px rgba(0,102,204,0.25)}
.access-user-info{flex:1 1 auto;min-width:0}
.access-user-email{font-size:.82rem;font-weight:700;color:#18181b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.access-user-meta{font-size:.68rem;color:#8b8b93;font-weight:600;margin-top:1px}
.access-status-badge{flex:0 0 auto;font-size:.62rem;font-weight:800;letter-spacing:.03em;text-transform:uppercase;padding:3px 9px;border-radius:999px}
.access-status-badge.is-active{background:rgba(0,176,80,0.12);color:#00863e}
.access-status-badge.is-disabled{background:rgba(107,114,128,0.14);color:#6b7280}
.access-user-actions{flex:0 0 auto;display:flex;gap:6px}
.access-icon-btn{border:1px solid rgba(0,0,0,0.1);background:#fff;color:#3f3f46;font-size:.64rem;font-weight:700;padding:5px 10px;border-radius:999px;cursor:pointer;transition:background .15s,color .15s,border-color .15s;white-space:nowrap}
.access-icon-btn:hover{background:#0066CC;border-color:#0066CC;color:#fff}
.access-icon-btn-danger:hover{background:#dc2626;border-color:#dc2626;color:#fff}

.access-loading,.access-empty-state{text-align:center;padding:24px 12px;font-size:.76rem;color:#9ca3af;font-weight:600;border:1px dashed rgba(0,0,0,0.1);border-radius:14px}
.access-empty-icon{display:block;font-size:1.4rem;margin-bottom:6px;opacity:.5}

.access-add-section{border-top:1px solid rgba(0,0,0,0.08);padding-top:16px}
.access-add-title{font-size:.78rem;font-weight:800;color:#18181b;margin-bottom:2px}
.access-add-hint{font-size:.66rem;color:#9ca3af;font-weight:600;margin-bottom:10px;line-height:1.4}
.access-add-row{display:flex;gap:8px}
.access-add-input{flex:1 1 auto;height:38px}
.access-add-btn{flex:0 0 auto;height:38px;padding:0 16px;border:none;border-radius:10px;background:linear-gradient(135deg,#00B050,#00863e);color:#fff;font-size:.76rem;font-weight:800;cursor:pointer;transition:opacity .15s;white-space:nowrap}
.access-add-btn:hover{opacity:.88}
.access-add-btn:disabled{opacity:.6;cursor:default}

/* Manage Access trigger button inside the SiteLog list table */
.access-manage-btn{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 12px;border-radius:999px;border:1px solid rgba(0,102,204,0.3);background:rgba(0,102,204,0.06);color:#0066CC;font-size:.66rem;font-weight:800;cursor:pointer;transition:background .15s,color .15s,box-shadow .15s;white-space:nowrap}
.access-manage-btn:hover{background:#0066CC;color:#fff;box-shadow:0 3px 10px rgba(0,102,204,0.3)}
.access-manage-icon{width:6px;height:6px;border-radius:999px;background:currentColor;opacity:.75}
.access-readonly-hint{font-size:.62rem;font-weight:600;color:#9ca3af;font-style:italic}

/* Dark mode */
.dark .access-modal-subtitle{color:#9ca3af}
.dark .access-modal-close{background:rgba(255,255,255,0.08);color:#d4d4d8}
.dark .access-modal-close:hover{background:rgba(220,38,38,0.22);color:#fecaca}
.dark .access-user-card{border-color:rgba(255,255,255,0.08);background:linear-gradient(180deg,rgba(0,176,80,0.06),rgba(0,102,204,0.04))}
.dark .access-user-email{color:#f3f4f6}
.dark .access-user-meta{color:#a1a1aa}
.dark .access-icon-btn{background:#27272a;border-color:rgba(255,255,255,0.12);color:#d4d4d8}
.dark .access-loading,.dark .access-empty-state{border-color:rgba(255,255,255,0.14);color:#a1a1aa}
.dark .access-add-section{border-top-color:rgba(255,255,255,0.1)}
.dark .access-add-title{color:#f3f4f6}
.dark .access-add-hint{color:#a1a1aa}
.dark .access-manage-btn{border-color:rgba(96,165,250,0.4);background:rgba(96,165,250,0.1);color:#93c5fd}
.dark .access-readonly-hint{color:#71717a}

.sl-readonly-badge{display:inline-flex;align-items:center;gap:5px;margin-top:4px;padding:2px 10px;border-radius:999px;background:rgba(255,255,255,0.16);border:1px solid rgba(255,255,255,0.35);color:#fff;font-size:.62rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
.sl-readonly-badge::before{content:'';width:6px;height:6px;border-radius:999px;background:#fbbf24}

/* Active SiteLog list — filter bar aligned with the "+ New Sitelog" CTA,
   mirroring the Active Projects filter row for a unified look. */
.pt-filters-with-cta{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.pt-filter-group{display:flex;gap:8px;flex-wrap:wrap}

/* ============================================================
   SITELOG — Tier 3 header bar: collapsible Project Timeline
   ============================================================ */
.sl-timeline-bar{background:#f3f4f6;border-bottom:1px solid rgba(0,0,0,0.08);position:sticky;top:111px;z-index:30}
.sl-timeline-toggle{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:7px 16px;background:transparent;border:none;cursor:pointer;text-align:center;}
.sl-timeline-toggle:hover{background:rgba(0,0,0,0.03)}
.sl-timeline-arrow{display:inline-flex;font-size:.7rem;color:#6b7280;transition:transform .18s ease;flex:0 0 auto}
.sl-timeline-toggle[aria-expanded="true"] .sl-timeline-arrow{transform:rotate(90deg)}
.sl-timeline-bar-title{font-size:.7rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#52525b;flex:0 0 auto}
.sl-timeline-bar-summary{font-size:.68rem;font-weight:600;color:#9ca3af;flex:0 0 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sl-timeline-panel{background:#fafafa;border-top:1px solid rgba(0,0,0,0.08);animation:slTimelineFadeIn .16s ease}
.sl-timeline-panel.hidden{display:none}
.sl-timeline-systems{display:flex;flex-wrap:wrap;gap:16px;padding:8px 16px;justify-content:center;font-size:.68rem;color:#4b5563}
.sl-timeline-system-chip{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.sl-timeline-system-chip::before{content:'•';color:#9ca3af}
.sl-timeline-system-chip strong{font-size:.68rem;text-transform:uppercase;letter-spacing:.03em;color:#111827;font-weight:800}
.sl-timeline-system-chip.sl-timeline-system-late strong{color:#b91c1c}
.sl-timeline-empty{padding:10px 16px;text-align:center;font-size:.68rem;color:#9ca3af}
@keyframes slTimelineFadeIn{from{opacity:0}to{opacity:1}}

.dark .sl-timeline-bar{background:#18181b;border-bottom-color:rgba(255,255,255,0.08)}
.dark .sl-timeline-toggle:hover{background:rgba(255,255,255,0.04)}
.dark .sl-timeline-arrow{color:#a1a1aa}
.dark .sl-timeline-bar-title{color:#d4d4d8}
.dark .sl-timeline-bar-summary{color:#71717a}
.dark .sl-timeline-panel{background:#111113;border-top-color:rgba(255,255,255,0.08)}
.dark .sl-timeline-systems{color:#d4d4d8}
.dark .sl-timeline-system-chip strong{color:#f4f4f5}

/* ============================================================
   DUAL CALENDAR — Start/End date range picker
   ============================================================ */
.dcal-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.55);display:flex;align-items:center;justify-content:center;z-index:200;padding:16px}
.dcal-overlay.hidden{display:none}
.dcal-card{background:#fff;border-radius:18px;padding:22px;width:640px;max-width:96vw;max-height:92vh;overflow-y:auto;box-shadow:0 24px 70px rgba(0,0,0,0.35)}
.dcal-card-header{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:14px}
.dcal-title{font-size:1rem;font-weight:800;color:#18181b;margin:0}
.dcal-subtitle{font-size:.76rem;color:#6b7280;font-weight:600;margin:2px 0 0}
.dcal-close-btn{width:28px;height:28px;border:none;background:rgba(0,0,0,0.05);border-radius:999px;font-size:1.05rem;color:#52525b;cursor:pointer}
.dcal-close-btn:hover{background:rgba(220,38,38,0.1);color:#dc2626}

.dcal-panels{display:flex;gap:16px;flex-wrap:wrap}
.dcal-panel{flex:1 1 260px;min-width:240px;border-radius:14px;padding:12px;border:2px solid transparent}
.dcal-panel-start{background:rgba(0,102,204,0.05);border-color:rgba(0,102,204,0.25)}
.dcal-panel-end{background:rgba(143,35,122,0.05);border-color:rgba(143,35,122,0.25)}
.dcal-panel-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;flex-wrap:wrap;gap:6px}
.dcal-panel-label{font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.03em}
.dcal-panel-start .dcal-panel-label{color:#0066CC}
.dcal-panel-end .dcal-panel-label{color:#8F237A}
.dcal-nav{display:flex;align-items:center;gap:6px}
.dcal-nav-btn{width:24px;height:24px;border:1px solid rgba(0,102,204,0.35);background:rgba(0,102,204,0.08);border-radius:6px;cursor:pointer;font-size:1rem;font-weight:800;line-height:1;color:#0066CC}
.dcal-nav-btn:hover{background:#0066CC;color:#fff;border-color:#0066CC}
.dcal-nav-btn:disabled{opacity:.35;cursor:default;background:rgba(0,0,0,0.06);color:#3f3f46;border-color:transparent}
.dcal-month-label{font-size:.7rem;font-weight:700;color:#3f3f46;min-width:88px;text-align:center}

.dcal-weekdays{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;margin-bottom:2px}
.dcal-weekday{font-size:.6rem;font-weight:800;text-align:center;color:#9ca3af;text-transform:uppercase}
.dcal-weekday.is-sat{color:#0066CC}
.dcal-weekday.is-sun{color:#dc2626}
.dcal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}
.dcal-day{aspect-ratio:1;border:none;background:transparent;border-radius:8px;font-size:.72rem;font-weight:600;color:#27272a;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .12s}
.dcal-day-empty{cursor:default}
.dcal-day:hover:not(:disabled):not(.dcal-day-empty){background:rgba(0,0,0,0.08)}
.dcal-day.is-sat{color:#0066CC;font-weight:800}
.dcal-day.is-sun{color:#dc2626;font-weight:800}
.dcal-day.in-range{background:rgba(0,176,80,0.14)}
.dcal-day.is-start-selected{background:#0066CC!important;color:#fff!important}
.dcal-day.is-end-selected{background:#8F237A!important;color:#fff!important}
.dcal-day.is-disabled{opacity:.3;cursor:default}
/* Point l (22/07): highlight today's date in yellow in BOTH the Start and
   End panels -- a ring so it stays visible even if today is also the
   selected/in-range day (which keeps its own fill on top). */
.dcal-day.is-today{box-shadow:inset 0 0 0 2px #f59e0b}
.dcal-day.is-today:not(.is-start-selected):not(.is-end-selected){background:rgba(245,158,11,0.16);color:#92400e;font-weight:800}
.dcal-selected-value{margin-top:8px;font-size:.68rem;font-weight:700;color:#52525b;text-align:center}

.dcal-footer{display:flex;align-items:center;justify-content:space-between;margin-top:16px;padding-top:14px;border-top:1px solid rgba(0,0,0,0.08)}
.dcal-footer-right{display:flex;gap:8px}
.dcal-clear-btn{background:none;border:1px solid rgba(220,38,38,0.35);color:#dc2626;font-size:.75rem;font-weight:700;padding:7px 14px;border-radius:8px;cursor:pointer}
.dcal-clear-btn:hover{background:rgba(220,38,38,0.08)}
.dcal-cancel-btn{background:none;border:1px solid rgba(0,0,0,0.15);color:#3f3f46;font-size:.75rem;font-weight:700;padding:7px 14px;border-radius:8px;cursor:pointer}
.dcal-apply-btn{background:#00B050;border:none;color:#fff;font-size:.75rem;font-weight:800;padding:7px 16px;border-radius:8px;cursor:pointer}
.dcal-apply-btn:hover{opacity:.88}

.dark .dcal-card{background:#18181b;box-shadow:0 24px 70px rgba(0,0,0,0.6)}
.dark .dcal-title{color:#f3f4f6}
.dark .dcal-subtitle{color:#a1a1aa}
.dark .dcal-close-btn{background:rgba(255,255,255,0.08);color:#d4d4d8}
.dark .dcal-panel-start{background:rgba(96,165,250,0.08);border-color:rgba(96,165,250,0.3)}
.dark .dcal-panel-end{background:rgba(232,121,249,0.08);border-color:rgba(232,121,249,0.3)}
.dark .dcal-panel-start .dcal-panel-label{color:#93c5fd}
.dark .dcal-panel-end .dcal-panel-label{color:#f0abfc}
.dark .dcal-nav-btn{background:rgba(96,165,250,0.12);color:#93c5fd;border-color:rgba(96,165,250,0.4)}
.dark .dcal-nav-btn:hover{background:#3b82f6;color:#fff;border-color:#3b82f6}
.dark .dcal-nav-btn:disabled{background:rgba(255,255,255,0.06);color:#71717a;border-color:transparent}
.dark .dcal-month-label{color:#e4e4e7}
.dark .dcal-weekday{color:#71717a}
.dark .dcal-weekday.is-sat{color:#60a5fa}
.dark .dcal-weekday.is-sun{color:#f87171}
.dark .dcal-day{color:#e4e4e7}
.dark .dcal-day:hover:not(:disabled):not(.dcal-day-empty){background:rgba(255,255,255,0.1)}
.dark .dcal-day.is-sat{color:#60a5fa}
.dark .dcal-day.is-sun{color:#f87171}
.dark .dcal-day.in-range{background:rgba(0,176,80,0.22)}
.dark .dcal-day.is-today{box-shadow:inset 0 0 0 2px #fbbf24}
.dark .dcal-day.is-today:not(.is-start-selected):not(.is-end-selected){background:rgba(251,191,36,0.18);color:#fde68a;font-weight:800}
.dark .dcal-selected-value{color:#a1a1aa}
.dark .dcal-footer{border-top-color:rgba(255,255,255,0.1)}
.dark .dcal-cancel-btn{border-color:rgba(255,255,255,0.15);color:#d4d4d8}

/* Native date inputs that now open the dual calendar instead of the browser's
   single-month picker (Planned Start/Finish across TT2 and TT3). */
.dcal-trigger-input{cursor:pointer;background-color:rgba(0,102,204,0.04)}
.dcal-trigger-input:hover{background-color:rgba(0,102,204,0.1);border-color:#0066CC}
.dark .dcal-trigger-input{background-color:rgba(96,165,250,0.08)}
.dark .dcal-trigger-input:hover{background-color:rgba(96,165,250,0.18);border-color:#60a5fa}

/* Resource Directory — Excel import/export/template */
.resource-directory-divider{width:1px;height:22px;background:rgba(0,0,0,0.12);margin:0 2px}
.dark .resource-directory-divider{background:rgba(255,255,255,0.15)}
.resx-import-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.resx-import-summary{font-size:.75rem;font-weight:700;color:#3f3f46;display:flex;gap:12px;flex-wrap:wrap}
.dark .resx-import-summary{color:#d4d4d8}
.resx-row-status{font-size:.62rem;font-weight:800;padding:2px 8px;border-radius:999px;text-transform:uppercase;white-space:nowrap}
.resx-row-status.ok{background:rgba(0,176,80,0.14);color:#00863e}
.resx-row-status.dup{background:rgba(169,101,21,0.16);color:#A96515}
.resx-row-status.invalid{background:rgba(220,38,38,0.14);color:#dc2626}
.resx-row-invalid td{opacity:.65}

/* Presence — long-press drag-fill (O / X / clear) on resource cells */
@keyframes presDragArmPulse{0%,100%{box-shadow:inset 0 0 0 2px rgba(0,102,204,0.35)}50%{box-shadow:inset 0 0 0 2px rgba(0,102,204,0.9)}}
.presence-drag-arming{animation:presDragArmPulse .5s ease-in-out infinite}
body.presence-drag-active{cursor:grabbing;user-select:none}
.presence-drag-preview-o{background:rgba(0,176,80,0.35)!important;outline:1px dashed #00863e}
.presence-drag-preview-x{background:rgba(234,88,12,0.32)!important;outline:1px dashed #c2410c}
.presence-drag-preview-clear{background:repeating-linear-gradient(45deg,rgba(107,114,128,0.18) 0 4px,transparent 4px 8px)!important;outline:1px dashed #6b7280}

/* ============================================================
   LAYOUT — photo / PDF attachments (SiteLog + Builder TT1 + Tracker)
   ============================================================ */
.layout-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.layout-filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.layout-pill { padding: 5px 12px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; background: #f3f4f6; color: #6b7280; border: 1px solid transparent; cursor: pointer; transition: all 0.15s; }
.dark .layout-pill { background: #1f2937; color: #9ca3af; }
.layout-pill:hover { color: #111; }
.dark .layout-pill:hover { color: #f3f4f6; }
.layout-pill.active { background: #00B050; color: #fff; }
.layout-search { max-width: 220px; flex: 1 1 160px; }
.layout-toolbar label.action-btn { display: inline-flex; align-items: center; }

.layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.layout-card { border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; background: #fff; transition: box-shadow 0.15s, transform 0.15s; }
.dark .layout-card { border-color: #374151; background: #1f2937; }
.layout-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.12); transform: translateY(-2px); }
.layout-card-thumb { position: relative; aspect-ratio: 4/3; background: #f3f4f6; cursor: pointer; overflow: hidden; }
.dark .layout-card-thumb { background: #111827; }
.layout-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.layout-file-icon { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; color: #9ca3af; }
.layout-card-badge { position: absolute; top: 6px; left: 6px; background: rgba(17,24,39,0.7); color: #fff; font-size: 0.62rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; letter-spacing: 0.03em; text-transform: uppercase; }
.layout-card-delete { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(220,38,38,0.85); color: #fff; border: none; font-size: 0.9rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.layout-card-delete:hover { background: #dc2626; }
.layout-card-meta { padding: 8px 10px; }
.layout-card-name { font-size: 0.75rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #111; }
.dark .layout-card-name { color: #f3f4f6; }
.layout-card-caption-input { width: 100%; margin-top: 4px; padding: 4px 6px; font-size: 0.7rem; border: 1px solid #e5e7eb; border-radius: 4px; background: #fff; color: #111; }
.dark .layout-card-caption-input { background: #111827; border-color: #374151; color: #f3f4f6; }
.layout-card-caption { margin-top: 4px; font-size: 0.7rem; color: #6b7280; font-style: italic; }
.layout-card-sub { margin-top: 4px; font-size: 0.65rem; color: #9ca3af; }

/* Advanced viewer */
.layout-viewer-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(10,10,12,0.94); display: flex; flex-direction: column; }
.layout-viewer-overlay.hidden { display: none; }
.layout-viewer-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; color: #fff; flex-wrap: wrap; gap: 8px; }
.layout-viewer-title { font-size: 0.8rem; font-weight: 600; opacity: 0.9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.layout-viewer-actions { display: flex; align-items: center; gap: 6px; }
.layout-viewer-actions button, .layout-viewer-actions a { background: rgba(255,255,255,0.12); color: #fff; border: none; border-radius: 6px; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.95rem; text-decoration: none; transition: background 0.15s; }
.layout-viewer-actions button:hover, .layout-viewer-actions a:hover { background: rgba(255,255,255,0.25); }
.layout-viewer-actions #layoutViewerZoomReset { width: auto; padding: 0 10px; font-size: 0.7rem; font-weight: 700; }
.layout-viewer-actions #layoutViewerDeleteBtn { background: rgba(220,38,38,0.75); }
.layout-viewer-actions #layoutViewerDeleteBtn:hover { background: #dc2626; }
.layout-viewer-stage { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; touch-action: none; }
.layout-viewer-stage img { max-width: 90vw; max-height: 80vh; cursor: grab; user-select: none; transition: transform 0.05s linear; touch-action: none; }
.layout-viewer-stage img:active { cursor: grabbing; }
.layout-viewer-stage iframe { width: 90vw; height: 82vh; border: none; background: #fff; border-radius: 6px; }
.layout-viewer-fallback { color: #e5e7eb; text-align: center; font-size: 0.85rem; }
.layout-viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.12); color: #fff; border: none; width: 42px; height: 42px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; z-index: 2; }
.layout-viewer-nav:hover { background: rgba(255,255,255,0.28); }
.layout-viewer-prev { left: 14px; }
.layout-viewer-next { right: 14px; }
.layout-viewer-nav.hidden { display: none; }

/* Admin-only delete button on the Active SiteLog list row */
.pt-delete-btn { background: #dc2626; color: #fff; width: 30px; padding: 0; font-size: 0.85rem; margin-right: 0; }
.pt-delete-btn:hover { background: #b91c1c; opacity: 1; }

/* ============================================================
   LOCKED HEADER LAYOUT + WINDOWS-STYLE SORTABLE/FILTERABLE
   COLUMN HEADERS — Active Projects / Active SiteLogs
   ============================================================ */
.hub-topbar-title { display:flex; flex-direction:column; margin-left:16px; flex:1; min-width:0; color:#fff; }
.hub-title-inline { font-size:1.05rem; font-weight:800; letter-spacing:.02em; text-shadow:0 2px 10px rgba(0,0,0,.25); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin:0; }
.hub-subtitle-inline { font-size:.7rem; color:rgba(255,255,255,.78); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media (max-width:900px){ .hub-subtitle-inline{ display:none; } }
@media (max-width:640px){ .hub-topbar-title{ display:none; } }

.pt-content-locked { display:flex; flex-direction:column; min-height:0; flex:1; overflow:hidden; }
.pt-content-locked .pt-filters,
.pt-content-locked .pt-legend { flex:0 0 auto; }
.pt-content-locked .pt-table-wrapper.pt-table-scroll { flex:1 1 auto; min-height:0; margin-top:14px; }

#projectsTablePage .pt-table-wrapper.pt-table-scroll,
#sitelogListPage .pt-table-wrapper.pt-table-scroll {
  overflow-y: auto !important;
  overflow-x: auto !important;
  display: block !important;
}
.pt-table-scroll table.pt-table thead th {
  position: sticky; top: 0; z-index: 6;
  background: #1e293b; color: #e2e8f0;
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}
.dark .pt-table-scroll table.pt-table thead th { background: #0f172a; color: #cbd5e1; box-shadow: 0 1px 0 rgba(255,255,255,0.08); }
.pt-table-scroll table.pt-table thead .smart-th-label:hover { color: #7dd3fc; }
.pt-table-scroll table.pt-table thead .smart-th-filter-btn { color: #94a3b8; }
.pt-table-scroll table.pt-table thead .smart-th-filter-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
.pt-table-scroll table.pt-table thead .smart-th-filter-btn.is-active { color: #4ade80; }

.pt-table-scroll table.pt-table tbody tr { cursor: pointer; transition: background 0.1s; }
.pt-table-scroll table.pt-table tbody tr:hover td { background: rgba(0,102,204,0.06); }
.pt-table-scroll table.pt-table tbody tr.row-selected td { background: rgba(0,102,204,0.16) !important; box-shadow: inset 3px 0 0 #0066CC; }
.dark .pt-table-scroll table.pt-table tbody tr:hover td { background: rgba(96,165,250,0.10); }
.dark .pt-table-scroll table.pt-table tbody tr.row-selected td { background: rgba(96,165,250,0.20) !important; box-shadow: inset 3px 0 0 #60a5fa; }

/* Smart (Windows-Explorer style) sortable + filterable column headers */
.smart-th { position: relative; }
.smart-th-label { cursor: pointer; user-select: none; }
.smart-th-label:hover { color: #0066CC; }
.dark .smart-th-label:hover { color: #60a5fa; }
.smart-th-filter-btn { background: none; border: none; cursor: pointer; color: #9ca3af; font-size: .65rem; margin-left: 4px; padding: 2px 4px; border-radius: 4px; vertical-align: middle; }
.smart-th-filter-btn:hover { background: rgba(0,0,0,0.08); color: #111; }
.dark .smart-th-filter-btn:hover { background: rgba(255,255,255,0.12); color: #f3f4f6; }
.smart-th-filter-btn.is-active { color: #00B050; font-weight: 900; }

.smart-filter-popover { position: fixed; z-index: 10000; width: 220px; background: #fff; border-radius: 10px; box-shadow: 0 12px 36px rgba(0,0,0,0.28); border: 1px solid rgba(0,0,0,0.08); padding: 8px; font-size: .75rem; }
.dark .smart-filter-popover { background: #18181b; border-color: rgba(255,255,255,0.1); color: #f3f4f6; }
.smart-filter-search { width: 100%; padding: 6px 8px; border: 1px solid #e5e7eb; border-radius: 6px; font-size: .72rem; margin-bottom: 6px; background:#fff; color:#111; box-sizing:border-box; }
.dark .smart-filter-search { background:#27272a; border-color:#3f3f46; color:#f3f4f6; }
.smart-filter-actions { display: flex; gap: 6px; margin-bottom: 6px; }
.smart-filter-actions button { flex:1; background: none; border: 1px solid #e5e7eb; border-radius: 6px; padding: 4px 6px; font-size: .68rem; font-weight: 700; cursor: pointer; color:#3f3f46; }
.dark .smart-filter-actions button { border-color:#3f3f46; color:#d4d4d8; }
.smart-filter-actions button:hover { background: rgba(0,0,0,0.05); }
.smart-filter-list { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.smart-filter-item { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 6px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight:400; }
.smart-filter-item:hover { background: rgba(0,0,0,0.05); }
.dark .smart-filter-item:hover { background: rgba(255,255,255,0.08); }
.smart-filter-footer { display: flex; justify-content: flex-end; }
.smart-filter-footer button { background: #00B050; color: #fff; border: none; border-radius: 6px; padding: 5px 14px; font-size: .72rem; font-weight: 800; cursor: pointer; }
.smart-filter-footer button:hover { opacity: .88; }

/* E80 One — Operations Network & Execution: two-line platform brand title */
.hub-title-line2 { color: #fff; font-size: 1.5rem; font-weight: 800; letter-spacing: 0.03em; text-shadow: 0 2px 12px rgba(0,0,0,0.25); margin-top: 2px; }
.login-title-line2 { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.04em; color: #111; margin-top: -2px; margin-bottom: 6px; }
.dark .login-title-line2 { color: #f3f4f6; }

/* Project-wide MM/DD/YYYY date display: the real <input type="date"> stays in
   the DOM (untouched value/behavior for all business logic) but invisible;
   a readonly companion shows the standardized format and opens the native picker. */
.dcal-native-hidden { position: absolute !important; opacity: 0 !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: 0 !important; border: none !important; pointer-events: none !important; overflow: hidden !important; }
.dcal-date-display { cursor: pointer; }

/* Login: generic example email shown in a distinct blue tone (never a real name) */
#loginUserId::placeholder, #visitorEmail::placeholder { color: #0066CC; opacity: 0.85; }
.dark #loginUserId::placeholder, .dark #visitorEmail::placeholder { color: #60a5fa; }

/* Active Projects / Active SiteLogs — center every header title and cell value */
#projectsTablePage .pt-table th, #projectsTablePage .pt-table td,
#sitelogListPage .pt-table th, #sitelogListPage .pt-table td { text-align: center !important; }
#projectsTablePage .pt-table td > *, #sitelogListPage .pt-table td > * { justify-content: center; }
#projectsTablePage .pt-table .pt-fav-star, #sitelogListPage .pt-table .pt-fav-star { margin-right: 6px; }
#projectsTablePage .pt-table .sl-final-user-access, #sitelogListPage .pt-table .sl-final-user-access { justify-content: center; }

/* Hub background signature: needs strong contrast against the photo backdrop */
.hub-page .brand-footer { color: rgba(255,255,255,0.9); text-shadow: 0 1px 5px rgba(0,0,0,0.7); border-top-color: rgba(255,255,255,0.18); position: relative; z-index: 2; font-weight: 500; }
.hub-page .brand-footer .brand-name { color: #fff; }

/* TT2 single-click compaction (Standard Conveyors / PCTZ / Stacker Crane / Smart Store):
   1 click hides just the activity rows, keeping Install/PLC progress visible;
   2 clicks (via .collapsed, existing rule) hides the whole card. */
.tt2-block.activities-hidden tbody tr:not(.schedule-row):not(.unified-schedule-header) { display: none !important; }

/* SiteLog / Resources — fix cramped, overlapping columns */
.sl-resources-table { border-collapse: separate; border-spacing: 0; width: auto; table-layout: auto; }
.sl-resources-table th:nth-child(1), .sl-resources-table td:nth-child(1) { width: 34px; min-width: 34px; }
.sl-resources-table th:nth-child(2), .sl-resources-table td:nth-child(2) { min-width: 100px; }
.sl-resources-table th:nth-child(3), .sl-resources-table td:nth-child(3) { min-width: 100px; }
.sl-resources-table th:nth-child(4), .sl-resources-table td:nth-child(4) { min-width: 78px; }
.sl-resources-table th:nth-child(5), .sl-resources-table td:nth-child(5) { min-width: 90px; }
.sl-resources-table th:nth-child(6), .sl-resources-table td:nth-child(6) { min-width: 130px; }
.sl-resources-table th:nth-child(7), .sl-resources-table td:nth-child(7) { min-width: 100px; }
.sl-resources-table th:nth-child(8), .sl-resources-table td:nth-child(8) { min-width: 78px; }
.sl-resources-table th:nth-child(9), .sl-resources-table td:nth-child(9) { min-width: 60px; }
.sl-resources-table th:nth-child(10), .sl-resources-table td:nth-child(10) { min-width: 70px; }
.sl-resources-table th:nth-child(11), .sl-resources-table td:nth-child(11) { min-width: 100px; }
.sl-resources-table th:nth-child(12), .sl-resources-table td:nth-child(12) { min-width: 100px; }
.sl-resources-table td select, .sl-resources-table td input { font-size: 0.72rem; padding: 3px 5px; }

/* Resource Directory — delete moved to column 1, compact columns, room left
   on the right for future additions instead of stretching to fill the panel. */
#resourceDirectoryContainer .editable-list-table { width: auto; table-layout: auto; }
#resourceDirectoryContainer .editable-list-table .editable-list-del-col { width: 34px; min-width: 34px; }
#resourceDirectoryContainer .editable-list-table td input,
#resourceDirectoryContainer .editable-list-table td select { min-width: 90px; font-size: 0.72rem; padding: 4px 6px; }
.sl-resources-table th { position: sticky; top: 0; background: #1e293b; color: #e2e8f0; white-space: nowrap; padding: 8px 10px; z-index: 3; border-right: 1px solid rgba(255,255,255,0.08); text-align: center; }
.dark .sl-resources-table th { background: #0f172a; color: #cbd5e1; }
.sl-resources-table thead .smart-th-label:hover { color: #7dd3fc; }
.sl-resources-table thead .smart-th-filter-btn { color: #94a3b8; }
.sl-resources-table thead .smart-th-filter-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
.sl-resources-table thead .smart-th-filter-btn.is-active { color: #4ade80; }
.sl-resources-table td { padding: 6px 8px; border-right: 1px solid rgba(0,0,0,0.06); border-bottom: 1px solid rgba(0,0,0,0.06); vertical-align: middle; }
.dark .sl-resources-table td { border-color: rgba(255,255,255,0.08); }
.sl-resources-table td input, .sl-resources-table td select { width: 100%; box-sizing: border-box; min-width: 90px; }
.sl-resources-table td:first-child { min-width: 34px; }
.sl-resources-table tbody tr:hover td { background: rgba(0,102,204,0.04); }
.dark .sl-resources-table tbody tr:hover td { background: rgba(96,165,250,0.06); }

/* SiteLog / Settings / Resource Directory — same Windows-style header as
   Resources, but height-locked to ~10 rows with its own internal scroll
   (the page itself no longer grows with the resource count). */
.resource-directory-locked { max-height: 460px; overflow-y: auto; border: 1px solid rgba(0,0,0,0.08); border-radius: 8px; }
.dark .resource-directory-locked { border-color: rgba(255,255,255,0.1); }
#resourceDirectoryContainer .editable-list-table thead tr.col-header td {
  position: sticky; top: 0; background: #1e293b; color: #e2e8f0; text-align: center;
  font-weight: 700; text-transform: uppercase; font-size: 0.68rem; letter-spacing: 0.03em;
  padding: 8px 10px; z-index: 3; border-right: 1px solid rgba(255,255,255,0.08); border-bottom: none;
}
.dark #resourceDirectoryContainer .editable-list-table thead tr.col-header td { background: #0f172a; color: #cbd5e1; }
#resourceDirectoryContainer .editable-list-table td { text-align: center; border-right: 1px solid rgba(0,0,0,0.06); }
.dark #resourceDirectoryContainer .editable-list-table td { border-color: rgba(255,255,255,0.08); }
#resourceDirectoryContainer .editable-list-table td input,
#resourceDirectoryContainer .editable-list-table td select { width: 100%; box-sizing: border-box; text-align: center; }

/* Login / Set-Password card: use the full "E80 One" logo as the hero image
   (bigger than the plain small mark) instead of stacked text lines. */
.login-logo-img-title { height: auto; max-width: 100%; width: 260px; margin: 0 auto 14px; display: block; }

/* Hub main title: same "E80 One" logo image, sized to sit cleanly above the
   "Choose a module to continue" subtitle without colliding with the
   background watermark. */
.hub-title-logo-img { display: block; margin: 0 auto 10px; width: 320px; max-width: 80vw; height: auto; filter: drop-shadow(0 2px 14px rgba(0,0,0,0.45)); position: relative; z-index: 2; }

/* Login/Set-Password footer: anchored to the bottom of the page (not the
   card), so it always reads clearly regardless of card height. */
.login-page { padding-bottom: 70px; }
.login-page-footer { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; margin: 0; z-index: 2; background: transparent; border-top: none; }

/* Small brand mark below the Login button, sized to match the email/password fields. */
.login-footnote { margin-top: 22px; }
.login-footnote-logo { width: 100%; max-width: 100%; height: auto; display: block; margin: 0 auto; opacity: 0.9; }

/* Hub background: large, faded "E80 One" mark blended into the desktop
   backdrop, independent from the small corner logo and the original watermark. */
.hub-page .hub-bg-brand-mark { position: absolute; right: -4%; bottom: 4%; width: 46%; max-width: 640px; opacity: 0.16; pointer-events: none; z-index: 0; filter: drop-shadow(0 0 40px rgba(0,0,0,0.25)); }
@media (max-width: 900px) { .hub-page .hub-bg-brand-mark { width: 70%; opacity: 0.12; } }

/* Hub footer: anchored to the true bottom of the page (not just after the
   cards), matching the login page's footer behavior. */
.hub-page-footer { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; margin: 0; z-index: 2; }

.hub-page { padding-bottom: 64px; box-sizing: border-box; }

/* Presence — Planning summary rows (Daily Working Days / Site Weeks /
   Incremental Days per Week / Incremental Cost per Week) */
.presence-summary-planning th, .presence-summary-planning td { background: #eef2ff; color: #1e293b; font-weight: 700; font-size: 0.68rem; text-align: center; border-top: 1px solid rgba(0,0,0,0.08); }
.presence-summary-planning th:first-child { text-align: right; text-transform: uppercase; letter-spacing: 0.03em; color: #4338ca; }
.dark .presence-summary-planning th, .dark .presence-summary-planning td { background: #1e1b4b; color: #e0e7ff; border-color: rgba(255,255,255,0.08); }
.dark .presence-summary-planning th:first-child { color: #a5b4fc; }

/* TOTAL FIELD E0ZZ10 / TOTAL TURN-KEY ACTIV. / TOTAL OTHERS -- placeholder
   rows awaiting the per-category formula. Distinct light-green group so
   they read as a separate block from the indigo Planning Summary rows. */
.presence-planning-total-by-type th, .presence-planning-total-by-type td { background: #dcfce7 !important; color: #14532d; border-top: 1px solid rgba(0,0,0,0.08); }
.presence-planning-total-by-type th:first-child { text-align: right; text-transform: uppercase; letter-spacing: 0.03em; color: #166534; }
.presence-total-by-type-cell { color: #86efac; }
.dark .presence-planning-total-by-type th, .dark .presence-planning-total-by-type td { background: #052e16 !important; color: #bbf7d0; border-color: rgba(255,255,255,0.08); }
.dark .presence-planning-total-by-type th:first-child { color: #86efac; }

/* Collapsible "drawer": rows live in the table's normal flow when collapsed
   (zero footprint). When expanded, each row becomes position:sticky with a
   JS-measured (not guessed) bottom offset, so the panel stays pinned to the
   bottom edge of the Presence table's own scroll viewport (.presence-table-
   stage) and is visible at any scroll position within that table -- not
   only once scrolled all the way to the last resource row. Because these
   are real <tr>/<td> in the same #presenceTable, columns and week
   groupings stay perfectly aligned with the grid above in both states. */
/* Collapsible "drawer": rows live in the table's normal flow when collapsed
   (zero footprint). When expanded AND the table actually overflows its
   viewport, the whole <tfoot> row-group (not each row individually) becomes
   one single position:sticky block pinned to the bottom of the Presence
   table's scroll viewport (.presence-table-stage) -- visible at any scroll
   position, never only once scrolled to the last resource row. Sticking the
   row-group as ONE unit (instead of manually offsetting every row) removes
   any risk of rounding-error gaps/overlap between rows. Because these are
   real <tr>/<td> in the same #presenceTable, columns and week groupings
   stay perfectly aligned with the grid above in both states. */
#presenceTable .presence-planning-row { display: none; }
#presenceTable.presence-planning-expanded .presence-planning-row { display: table-row; }
#presenceTable.presence-planning-expanded.presence-planning-overflowing tfoot { position: sticky; bottom: 0; z-index: 24; background: #eef2ff; }
.dark #presenceTable.presence-planning-expanded.presence-planning-overflowing tfoot { background: #1e1b4b; }

/* Fixed trigger bar -- pinned to the very bottom of the viewport (not just
   the table's scroll container), always visible while the Presence tab is
   open. Double-click toggles the Planning Summary rows above. The table
   stage gets matching bottom padding so scrolled content sits flush
   against the bar with zero gap. */
#slview-presence { padding-bottom: 34px; }
.presence-planning-fixed-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; background: #4338ca; color: #fff; padding: 8px 16px; font-size: 0.74rem; font-weight: 700; display: flex; align-items: center; justify-content: space-between; cursor: pointer; box-shadow: 0 -4px 10px rgba(0,0,0,0.18); border-top: 3px solid #312e81; user-select: none; }
.presence-planning-fixed-bar:hover { background: #3730a3; }
.presence-planning-arrow { transition: transform 0.15s ease; font-size: 0.78rem; }
.dark .presence-planning-fixed-bar { background: #312e81; border-top-color: #1e1b4b; }
.dark .presence-planning-fixed-bar:hover { background: #3730a3; }


/* Presence toolbar refinements requested by user feedback:
   - bold black border on the "Hide/Show Details" toggle
   - blue Smart-Table headers, unified height with Resources tab, white
     centered text, on the 7 Smart-Table-enabled lists
   - Presence Planning table forced to light/day mode (black borders used
     for Gantt/Tracker contrast would be unreadable if inverted by dark mode)
*/
#togglePresenceDetailsBtn { border: 2px solid #000 !important; font-weight: 700; }

/* Smart Table headers: blue background, white centered text, height
   unified with the Resources tab header (28px) -- applies to every table
   using smartTableHeaderHtml (Active Projects/SiteLogs, Resources, and the
   7 tables wired via renderEditableList / Gantt Activities). */
.smart-th { background: #1d4ed8 !important; color: #fff !important; padding: 8px 10px !important; text-align: center !important; vertical-align: middle !important; white-space: nowrap; }
.smart-th-label { color: #fff !important; }
.smart-th-filter-btn { color: #fff !important; }
.smart-th-filter-btn.is-active { color: #fde047 !important; }
.dark .smart-th { background: #1e40af !important; color: #fff !important; }

/* Force the Presence Planning table to always render in light/day mode,
   regardless of the app-wide dark mode setting -- the black Gantt/Tracker
   borders and other high-contrast colors used inside it are tuned for a
   light background and would lose contrast/legibility if inverted. */
.dark #slview-presence, .dark #presenceTable, .dark .presence-table-stage {
  background: #fff !important; color: #111827 !important;
}
.dark #presenceTable th, .dark #presenceTable td { color: #111827; }
html.dark #slview-presence .presence-cell.presence-empty { background: #e5e7eb !important; color: #9ca3af !important; }
html.dark #slview-presence #presenceTable thead, html.dark #slview-presence #presenceTable thead tr, html.dark #slview-presence #presenceTable thead th { background-color: #f8fafc !important; color: #111827 !important; }
html.dark #slview-presence .presence-number-head, html.dark #slview-presence .presence-row-number, html.dark #slview-presence .presence-summary-day th, html.dark #slview-presence .presence-summary-day td { background: #f8fafc !important; color: #334155 !important; }
html.dark #slview-presence .presence-summary-week th { background: #dbeafe !important; color: #1e3a8a !important; }
html.dark #slview-presence .presence-empty-divider-edit, html.dark #slview-presence .presence-empty-divider-copy { color: #334155 !important; }
html.dark #slview-presence .presence-timeline-label { color: #374151 !important; }
html.dark #slview-presence .presence-timeline-track { background: #f3f4f6 !important; }
html.dark #slview-presence .presence-summary-planning th, html.dark #slview-presence .presence-summary-planning td { background: #eef2ff !important; color: #1e293b !important; border-color: rgba(0,0,0,0.08) !important; }
html.dark #slview-presence .presence-summary-planning th:first-child { color: #4338ca !important; }
html.dark #slview-presence .presence-planning-total-by-type th, html.dark #slview-presence .presence-planning-total-by-type td { background: #dcfce7 !important; color: #14532d !important; border-color: rgba(0,0,0,0.08) !important; }
html.dark #slview-presence .presence-planning-total-by-type th:first-child { color: #166534 !important; }
html.dark #slview-presence .presence-planning-fixed-bar { background: #4338ca !important; border-top-color: #312e81 !important; }
html.dark #slview-presence .presence-planning-fixed-bar:hover { background: #3730a3 !important; }
html.dark #slview-presence input:not(.presence-cell):not(.presence-activity-cell),
html.dark #slview-presence select,
html.dark #slview-presence button:not(.presence-cell):not(.presence-activity-cell):not(.presence-planning-fixed-bar) { background: #fff !important; color: #111827 !important; border-color: #cbd5e1 !important; }

/* Turnkey / Extra Costs / Commissioning / Needs & Requests / ODS Registry:
   compact, left-aligned data columns (headers stay centered via .smart-th).
   Delete "X" moved to the first column via deleteFirst:true. Inputs collapse
   to min-width:0 (their JS-side inline width wins), but <select> elements
   get no inline width unless col.width is set, so they keep a sane 110px
   floor here -- otherwise the header cell (centered, sized to the column)
   and the shrunk-to-content <select> below it visibly drift apart. */
#turnkeyContainer .editable-list-table td input,
#extraCostsContainer .editable-list-table td input,
#commissioningContainer .editable-list-table td input,
#needsContainer .editable-list-table td input,
#odsContainer .editable-list-table td input {
  text-align: left !important; font-size: 0.72rem !important; padding: 4px 6px !important; min-width: 0 !important;
}
#turnkeyContainer .editable-list-table td select,
#extraCostsContainer .editable-list-table td select,
#commissioningContainer .editable-list-table td select,
#needsContainer .editable-list-table td select,
#odsContainer .editable-list-table td select {
  text-align: left !important; font-size: 0.72rem !important; padding: 4px 6px !important; min-width: 110px !important;
}
#turnkeyContainer .editable-list-del-col, #extraCostsContainer .editable-list-del-col,
#commissioningContainer .editable-list-del-col, #needsContainer .editable-list-del-col,
#odsContainer .editable-list-del-col { width: 32px; min-width: 32px; text-align: center; }
.editable-list-readonly{min-height:29px;padding:5px 7px;border:1px solid #d1d5db;border-radius:5px;background:#f3f4f6;color:#374151;font-size:.72rem;display:flex;align-items:center}
#odsContainer .editable-list-table th{text-align:center!important;vertical-align:middle!important}
#odsContainer .editable-list-table td{text-align:center!important;vertical-align:middle!important}
#odsContainer .editable-list-table td input,#odsContainer .editable-list-table td select{text-align:center!important}
#odsContainer .editable-list-table th:nth-child(7),#odsContainer .editable-list-table td:nth-child(7){width:320px!important;min-width:320px!important;text-align:left!important}
#odsContainer .editable-list-table td:nth-child(7) input{width:100%!important;min-width:320px!important;text-align:left!important;box-sizing:border-box}
#odsContainer .editable-list-table td:nth-child(4) select{min-width:95px!important;width:95px}
#odsContainer .editable-list-readonly{justify-content:center;text-align:center}
.ods-registry-titlebar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px}
.ods-registry-titlebar h2{text-align:center}.ods-registry-titlebar button{justify-self:end}

.pt-view-btn-owned { background: #00B050 !important; }

.tk-required-missing{border-color:#dc2626 !important;background:#fef2f2 !important}
.tk-supplier-table th{white-space:nowrap;font-size:.66rem}
.tk-payment-row td{background:rgba(0,102,204,.04)}

#ccDashboardContainer .sitelog-kpi-label{font-size:.58rem!important;white-space:nowrap}
#ccDashboardContainer .sitelog-kpi-value{font-size:.82rem!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.tk-supplier-table th{background:#0066CC!important;color:#fff!important;text-align:center!important;white-space:nowrap;font-size:.62rem}
.tk-supplier-table td{text-align:center}
.tk-td-total-amount input{background:#dcfce7!important}
.tk-td-total-amount.tk-locked input{background:#e5e7eb!important;color:#6b7280!important}
.tk-lock-btn{border:none;background:transparent;cursor:pointer;font-size:.85rem;margin-left:2px}
.tk-computed-green{background:#ecfdf5!important;font-weight:600}
.tk-computed-orange{background:#fff7ed!important;font-weight:600}
.tk-payment-table th{background:#0066CC!important;color:#fff!important;text-align:center!important;font-size:.6rem;white-space:nowrap}
.tk-payment-table td{text-align:center}

/* Point 3 (22/07): warning blink for the P1 cell once it reaches 90% of P0 --
   same threshold/behavior as the equivalent indicator in Builder. */
@keyframes p1BlinkWarning { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.p1-blink-warning { animation: p1BlinkWarning 1s ease-in-out infinite; }

/* Point 1 (22/07): Project Resources "Weeks" cell -- compact mode toggle +
   number input sharing one column, matching the density of the rest of
   the Resources table. */
.resx-duration-cell { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.resx-mode-toggle { font-size: 0.62rem !important; padding: 3px 6px !important; background: #6b7280; color: #fff; border-radius: 5px; white-space: nowrap; }
.resx-mode-toggle:hover { background: #4b5563; }

/* Point 1 (26/07): Gantt Activities "Resources" column -- now a plain
   headcount input (names are managed exclusively in Presence Planning).
   The small summary underneath shows live "assigned/required" read off
   the Gantt-reserved rows in slCurrent.resources. */
.gantt-resources-cell { white-space: nowrap; }
.gantt-resources-input { width: 56px !important; display: inline-block; }
.gantt-resources-assigned-summary { display: block; margin-top: 3px; font-size: 0.62rem; font-weight: 700; color: #16a34a; }
.gantt-resources-assigned-summary.gantt-resources-incomplete { color: #A96515; }
.dark .gantt-resources-assigned-summary { color: #4ade80; }
.dark .gantt-resources-assigned-summary.gantt-resources-incomplete { color: #fbbf24; }

/* Point 2 (26/07): Presence Planning "Resource Layout" -- dragging is only
   meaningful/enabled once the layout is set to Custom (Grouped/Separate are
   deterministic display recomputations, so a drag there would just be
   discarded on next render). */
.presence-drag-handle.presence-drag-disabled { cursor: not-allowed; opacity: .35; }

/* Point h (22/07): overlapping resource assignments (same person, same or
   overlapping dates on two rows) blink red on top of the existing static
   highlight, and the row now carries a title tooltip (native "popup")
   explaining exactly which other assignment conflicts and its dates. */
@keyframes presenceOverlapBlink { 0%, 100% { background-color: #fecaca; } 50% { background-color: #fca5a5; } }
.presence-resource-overlap-blink { animation: presenceOverlapBlink 1s ease-in-out infinite !important; cursor: help; }

/* Point 9 (23/07): Project Resources overlap warning -- light red
   background on the Name field only, text color explicitly unchanged.
   Disappears automatically once resourceHasOverlap(r) is false again. */
.resx-name-overlap { background: #fecaca !important; }
.dark .resx-name-overlap { background: rgba(220,38,38,0.35) !important; }
/* Point 8 (23/07): overlapping Presence cells flash using the SAME
   opacity-pulse animation already defined for the P0/P1 alarm
   (.p1-blink-warning, see the Overview/Presence budget cards) -- reused
   here instead of a second animation, per spec. Cursor hints at the
   informational tooltip (the "popup" explaining the conflict). */
.presence-cell-overlap { cursor: help; }

/* Point 6 (23/07): Global KPI header, always visible across every SiteLog
   tab (lives outside the per-tab .slview containers). */
.sl-kpi-header { background: #0f172a; padding: 8px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.dark .sl-kpi-header { background: #0b1220; }
.sl-kpi-header-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.sl-kpi-item { display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 8px; background: rgba(255,255,255,0.06); }
.sl-kpi-label { font-size: 0.62rem; font-weight: 800; color: #93c5fd; text-transform: uppercase; letter-spacing: .03em; }
.sl-kpi-item strong { font-size: 0.82rem; color: #f8fafc; }
.sl-kpi-p0 { background: #DDF4E5; }
.sl-kpi-p0 .sl-kpi-label, .sl-kpi-p0 strong { color: #176B3A; }
.sl-kpi-e0zz10 { background: #DCEEFF; }
.sl-kpi-e0zz10 .sl-kpi-label, .sl-kpi-e0zz10 strong { color: #155E95; }
.sl-kpi-e0zz12 { background: #FFE8C2; }
.sl-kpi-e0zz12 .sl-kpi-label, .sl-kpi-e0zz12 strong { color: #9A4E00; }
.sl-kpi-e0cz { background: #E9E1FF; }
.sl-kpi-e0cz .sl-kpi-label, .sl-kpi-e0cz strong { color: #5936A2; }
.sl-kpi-p0 .sl-kpi-info, .sl-kpi-e0zz10 .sl-kpi-info,
.sl-kpi-e0zz12 .sl-kpi-info, .sl-kpi-e0cz .sl-kpi-info {
  background: rgba(15,23,42,.11); color: currentColor;
}
.sl-kpi-forecast { background: #00B050; transition: background .3s; }
.sl-kpi-forecast .sl-kpi-label { color: #dcfce7; }

/* Point 3 (23/07): accessible info icon + tooltip for every KPI. Fixed
   size so it never changes the header bar's height/alignment; the
   tooltip panel is absolutely positioned and only affects layout while
   open (hover/focus/click-toggle for touch), never pushing other items. */
.sl-kpi-info {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; padding: 0; margin: 0; border: none; background: rgba(255,255,255,0.18);
  color: #dbeafe; border-radius: 50%; font-size: 0.6rem; line-height: 1; cursor: pointer; flex-shrink: 0;
}
.sl-kpi-info:hover, .sl-kpi-info:focus-visible { background: rgba(255,255,255,0.35); outline: none; }
.sl-kpi-tooltip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: 240px; max-width: 60vw; background: #111827; color: #f3f4f6; font-size: 0.68rem; font-weight: 500;
  line-height: 1.4; text-transform: none; letter-spacing: normal; padding: 8px 10px; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35); opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .12s; z-index: 60;
}
.sl-kpi-tooltip::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #111827;
}
.sl-kpi-info:hover .sl-kpi-tooltip,
.sl-kpi-info:focus-visible .sl-kpi-tooltip,
.sl-kpi-info.is-open .sl-kpi-tooltip { opacity: 1; visibility: visible; }

/* Point 4 (26/07): Project Smart Board -- replaces the old single-week
   Weekly Notes editor with a chronological list of collapsible per-week
   workspace cards (note + attachments grid, the latter reusing the exact
   same layoutBuildToolbarAndGrid engine as Photos & Documents). */
.weekly-notes-nav { display: flex; align-items: center; gap: 8px; }
.smart-board-weeks { display: flex; flex-direction: column; gap: 10px; }
.smart-board-week-card { border: 1px solid #e5e7eb; border-left: 4px solid #0066CC; border-radius: 10px; background: #fff; overflow: hidden; }
.dark .smart-board-week-card { background: #1f2937; border-color: #374151; border-left-color: #0066CC; }
.smart-board-week-card.is-current-week { border-left-color: #00B050; }
.smart-board-week-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; flex-wrap: wrap; }
.smart-board-week-header:hover { background: #eff6ff; }
.dark .smart-board-week-header:hover { background: rgba(0,102,204,0.12); }
.smart-board-week-caret { font-size: 0.7rem; color: #6b7280; width: 14px; text-align: center; }
.smart-board-week-title { font-weight: 700; font-size: 0.82rem; color: #111827; flex: 1; }
.dark .smart-board-week-title { color: #f3f4f6; }
.smart-board-current-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 0.62rem; font-weight: 800; text-transform: uppercase; }
.dark .smart-board-current-tag { background: rgba(0,176,80,0.2); color: #6ee7b7; }
.smart-board-week-meta { font-size: 0.68rem; color: #9ca3af; white-space: nowrap; }
.smart-board-week-body { padding: 0 14px 14px; border-top: 1px solid #f1f5f9; }
.dark .smart-board-week-body { border-top-color: #374151; }
.smart-board-note-body { margin-top: 10px; }
.smart-board-week-attachments { margin-top: 10px; }


/* Point 26/07: "Index CHECK (temp)" -- raw data-verification table, safe to
   delete once the real Index rebuild replaces it. Amber accents mark it as
   temporary throughout so it's never mistaken for production UI. */
.nav-tab-sitelog.index-check-tab { color: #A96515 !important; font-weight: 800; }
.dark .nav-tab-sitelog.index-check-tab { color: #fbbf24 !important; }
.index-check-table th { text-transform: uppercase; font-size: 0.62rem; letter-spacing: .03em; }
.index-check-table td { font-size: 0.78rem; padding: 5px 10px; }
.index-check-table tr.ic-section td { background: #fef3c7; color: #92400e; font-weight: 800; font-size: 0.68rem; text-transform: uppercase; letter-spacing: .03em; padding: 6px 10px; }
.dark .index-check-table tr.ic-section td { background: #422006; color: #fbbf24; }
.index-check-table .ic-val { font-weight: 700; white-space: nowrap; }
.index-check-table .ic-note { color: #9ca3af; font-size: 0.68rem; }
.index-check-table .ic-flag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #fee2e2; color: #991b1b; font-size: 0.58rem; font-weight: 700; text-transform: none; letter-spacing: 0; }
.dark .index-check-table .ic-flag { background: rgba(220,38,38,.25); color: #fca5a5; }


/* Point 23/07: NC / Issues tab (formerly Extra Costs Tracking). */
.nc-issues-table td { vertical-align: top; padding: 6px 8px !important; }
.nc-attachments-cell { min-width: 160px; max-width: 220px; }
.nc-attachments-cell .layout-toolbar { flex-wrap: wrap; gap: 4px; }
.nc-attachments-cell .layout-grid { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 4px; }
.nc-registry-sent-badge { display: inline-block; padding: 3px 8px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 0.66rem; font-weight: 800; }
.dark .nc-registry-sent-badge { background: rgba(0,176,80,0.2); color: #6ee7b7; }


/* ===== V93 Project Control + Resources sub-tabs ===== */
.project-control-tab{position:relative;margin:5px 2px;padding:7px 13px!important;border:1px solid rgba(143,35,122,.35)!important;border-radius:999px!important;background:linear-gradient(135deg,rgba(143,35,122,.12),rgba(0,176,240,.12));color:#7c2d72!important;font-weight:900!important;letter-spacing:.035em}
.project-control-tab:hover{background:linear-gradient(135deg,#8F237A,#0066CC)!important;color:#fff!important}
.project-control-tab.active{background:linear-gradient(135deg,#8F237A,#0066CC)!important;color:#fff!important;border-bottom-color:transparent!important;box-shadow:0 4px 12px rgba(28,38,183,.25)}
.project-control-tab-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#00B050;margin-right:6px;box-shadow:0 0 0 3px rgba(0,176,80,.15)}
.project-control-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:14px;margin-bottom:14px;border-bottom:1px solid #e5e7eb}.dark .project-control-heading{border-color:#374151}.project-control-heading h2{font-size:1rem;font-weight:900;text-transform:uppercase;letter-spacing:.04em;color:#334155}.dark .project-control-heading h2{color:#f1f5f9}.project-control-heading p{font-size:.72rem;color:#94a3b8;margin-top:3px}
.project-control-live{display:inline-flex;align-items:center;gap:7px;padding:6px 10px;border-radius:999px;background:#dcfce7;color:#166534;font-size:.68rem;font-weight:900;white-space:nowrap}.project-control-live span{width:8px;height:8px;border-radius:50%;background:#22c55e;animation:projectControlPulse 1.6s ease-in-out infinite}@keyframes projectControlPulse{50%{opacity:.35;transform:scale(.85)}}.dark .project-control-live{background:rgba(34,197,94,.15);color:#86efac}
.resource-subtabs{display:flex;gap:6px;padding:4px;margin:-4px 0 18px;border-bottom:1px solid #e5e7eb}.dark .resource-subtabs{border-color:#374151}.resource-subtab{padding:9px 16px;border-radius:9px 9px 0 0;font-size:.76rem;font-weight:800;color:#64748b;border-bottom:3px solid transparent;transition:.15s}.resource-subtab:hover{color:#111827;background:#f8fafc}.dark .resource-subtab:hover{color:#f8fafc;background:#1f2937}.resource-subtab.active{color:#0066CC;border-bottom-color:#0066CC;background:#eff6ff}.dark .resource-subtab.active{background:rgba(0,102,204,.14);color:#60a5fa}.resource-subtab-p1.active{color:#8F237A;border-bottom-color:#8F237A;background:#fdf4ff}.dark .resource-subtab-p1.active{background:rgba(143,35,122,.14);color:#f0abfc}
.resource-subview{animation:fadeIn .18s ease-out}.resource-total-kpi{display:flex;align-items:center;gap:12px;padding:8px 12px;border-radius:10px;background:#f1f5f9;border:1px solid #dbe3ee}.dark .resource-total-kpi{background:#111827;border-color:#374151}.resource-total-kpi span{font-size:.66rem;font-weight:800;text-transform:uppercase;color:#64748b}.resource-total-kpi strong{font-size:1.15rem;color:#0066CC}.resource-insertion-mode-label{display:flex;flex-direction:column}.resource-insertion-mode-label span{font-size:.72rem;font-weight:900;color:#475569}.resource-insertion-mode-label small{font-size:.65rem;color:#94a3b8}
.p1-dedicated-panel{border:1px solid #dbe3ee;border-radius:12px;background:#f8fafc;overflow:hidden}.dark .p1-dedicated-panel{background:#111827;border-color:#374151}.p1-side-header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:14px 16px;border-bottom:1px solid #dbe3ee}.dark .p1-side-header{border-color:#374151}.p1-side-header h3{font-size:.85rem;font-weight:900;text-transform:uppercase;letter-spacing:.04em;color:#475569}.dark .p1-side-header h3{color:#e5e7eb}.p1-side-header p{font-size:.68rem;color:#94a3b8;margin-top:2px}.p1-side-enable{display:flex;align-items:center;gap:6px;font-size:.7rem;font-weight:800;white-space:nowrap}.p1-side-enable input,.p1-side-criteria-grid input,.p1-side-options input{accent-color:#00B050}.p1-side-body{padding:14px}.p1-side-disabled-note{display:none;padding:9px 10px;border:1px dashed #94a3b8;border-radius:7px;font-size:.68rem;color:#64748b;margin-bottom:12px}.p1-side-disabled .p1-side-disabled-note{display:block}.p1-dedicated-grid{display:grid;grid-template-columns:minmax(300px,360px) minmax(0,1fr);gap:16px;align-items:start}.p1-controls-column{min-width:0}.p1-results-column{min-width:0;border-left:1px solid #e2e8f0;padding-left:16px}.dark .p1-results-column{border-color:#374151}.p1-side-allocation{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:9px}.p1-side-allocation label,.p1-side-rates label{font-size:.67rem;font-weight:700;color:#64748b}.p1-side-allocation input,.p1-side-rates input{display:block;width:100%;margin-top:4px}.p1-side-criteria-card,.p1-side-options{border:1px solid #dbe3ee;border-radius:8px;padding:10px;margin-bottom:9px;background:#fff}.dark .p1-side-criteria-card,.dark .p1-side-options{background:#0f172a;border-color:#374151}.p1-side-criteria-card h4{font-size:.68rem;font-weight:900;text-transform:uppercase;color:#64748b;margin-bottom:7px}.p1-side-criteria-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 10px}.p1-side-criteria-grid label,.p1-side-options label{display:flex;align-items:center;gap:6px;font-size:.67rem;font-weight:700;color:#475569}.dark .p1-side-criteria-grid label,.dark .p1-side-options label{color:#cbd5e1}.p1-side-options{display:grid;gap:7px}.p1-side-options small{font-size:.61rem;color:#94a3b8}.p1-side-rates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-bottom:9px}.p1-side-help{font-size:.64rem;color:#94a3b8}.p1-side-disabled .p1-dedicated-grid{opacity:.5}.p1-side-table{min-width:760px;font-size:.72rem}.p1-side-table th,.p1-side-table td{padding:7px 8px;white-space:nowrap}.p1-side-resource{font-weight:700;max-width:160px;overflow:hidden;text-overflow:ellipsis}.p1-side-total td{font-weight:900;background:#eaf0f6}.dark .p1-side-total td{background:#1f2937}.p1-side-empty{padding:28px 12px;text-align:center;color:#94a3b8;font-size:.72rem;border:1px dashed #cbd5e1;border-radius:8px}.p1-money{text-align:right;font-variant-numeric:tabular-nums}
@media(max-width:980px){.p1-dedicated-grid{grid-template-columns:1fr}.p1-results-column{border-left:0;border-top:1px solid #e2e8f0;padding-left:0;padding-top:14px}.dark .p1-results-column{border-color:#374151}}@media(max-width:640px){.p1-side-rates,.p1-side-criteria-grid{grid-template-columns:1fr}.resource-subtabs{overflow-x:auto}}


/* ===== V94 — Light SiteLog tabs + Project Control Center ===== */
.nav-tab-sitelog{border-radius:8px 8px 0 0;margin:4px 2px 0;padding:8px 12px;border-bottom:3px solid transparent;transition:.16s ease;background:#f8fafc;color:#475569}
.nav-tab-sitelog[data-slview="overview"]{background:#ecfdf5;color:#166534}.nav-tab-sitelog[data-slview="presence"]{background:#eff6ff;color:#1d4ed8}.nav-tab-sitelog[data-slview="gantt"]{background:#f5f3ff;color:#6d28d9}.nav-tab-sitelog[data-slview="turnkey"]{background:#fff7ed;color:#c2410c}.nav-tab-sitelog[data-slview="extracosts"]{background:#fef2f2;color:#b91c1c}.nav-tab-sitelog[data-slview="commissioning"]{background:#ecfeff;color:#0e7490}.nav-tab-sitelog[data-slview="needs"]{background:#fefce8;color:#a16207}.nav-tab-sitelog[data-slview="budgetods"]{background:#f0fdf4;color:#15803d}.nav-tab-sitelog[data-slview="delayanalysis"]{background:#fff1f2;color:#be123c}.nav-tab-sitelog[data-slview="resources"]{background:#eef2ff;color:#4338ca}.nav-tab-sitelog[data-slview="weeklynotes"]{background:#fdf4ff;color:#a21caf}.nav-tab-sitelog[data-slview="layout"]{background:#f1f5f9;color:#334155}.nav-tab-sitelog[data-slview="settings"]{background:#f3f4f6;color:#374151}.nav-tab-sitelog.project-control-tab{background:#f3e8ff;color:#7e22ce;border:1px solid #e9d5ff}.nav-tab-sitelog:hover{filter:brightness(.98);transform:translateY(-1px)}.nav-tab-sitelog.active{box-shadow:inset 0 -3px 0 currentColor;font-weight:800}.dark .nav-tab-sitelog{filter:saturate(.75) brightness(.55);color:#fff}
.project-control-heading-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.pc-action-btn{border:1px solid #cbd5e1;border-radius:8px;padding:7px 12px;font-size:.75rem;font-weight:700;background:#fff;color:#334155;cursor:pointer}.pc-action-btn:hover{border-color:#8b5cf6;color:#7c3aed}.dark .pc-action-btn{background:#111827;border-color:#475569;color:#e5e7eb}
.pc-toolbar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:14px;border:1px solid #e5e7eb;border-radius:12px;background:#f8fafc;margin-bottom:14px}.dark .pc-toolbar{background:#111827;border-color:#374151}.pc-toolbar label{font-size:.7rem;font-weight:700;color:#64748b;display:flex;flex-direction:column;gap:5px}.pc-toolbar select{border:1px solid #cbd5e1;border-radius:7px;padding:7px;background:#fff;color:#111827}.dark .pc-toolbar select{background:#1f2937;color:#f9fafb;border-color:#475569}.pc-toolbar-options{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:14px;align-items:center}.pc-toolbar-options label{display:flex;flex-direction:row;align-items:center;gap:6px;font-weight:600;color:#475569}
.pc-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}.pc-kpi-card{border:1px solid #dbe2ea;border-radius:11px;padding:12px;background:#fff;position:relative;min-height:96px}.dark .pc-kpi-card{background:#111827;border-color:#374151}.pc-kpi-card small{display:block;color:#64748b;font-weight:800;font-size:.66rem;text-transform:uppercase;letter-spacing:.04em;padding-right:28px}.pc-kpi-card strong{display:block;font-size:1.25rem;margin-top:8px}.pc-kpi-card p{font-size:.68rem;color:#94a3b8;margin-top:4px;line-height:1.25}.pc-kpi-header-check{position:absolute;right:9px;top:9px;display:flex;align-items:center;gap:4px;font-size:.6rem;color:#64748b}
.pc-group{border:1px solid #dbe2ea;border-radius:12px;background:#fff;margin-bottom:12px;overflow:hidden}.dark .pc-group{background:#111827;border-color:#374151}.pc-group-head{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;border:0;background:transparent;text-align:left;cursor:pointer;color:inherit}.pc-group-title{display:flex;align-items:center;gap:10px}.pc-group-title b{font-size:.82rem}.pc-group-title span{font-size:.7rem;color:#64748b;display:block;margin-top:2px}.pc-group-summary{font-size:.7rem;color:#64748b;white-space:nowrap}.pc-chevron{transition:.18s}.pc-group.collapsed .pc-chevron{transform:rotate(-90deg)}.pc-group-body{padding:0 15px 15px}.pc-group.collapsed .pc-group-body{display:none}
.pc-mini-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-bottom:12px}.pc-mini-kpi{border:1px solid #e5e7eb;border-radius:8px;padding:9px;background:#f8fafc}.dark .pc-mini-kpi{background:#1f2937;border-color:#374151}.pc-mini-kpi small{font-size:.63rem;color:#64748b}.pc-mini-kpi strong{display:block;margin-top:3px}.pc-table{width:100%;border-collapse:collapse;font-size:.72rem}.pc-table th{background:#f1f5f9;color:#475569;text-align:left;padding:8px;border-bottom:1px solid #cbd5e1}.pc-table td{padding:8px;border-bottom:1px solid #e5e7eb}.dark .pc-table th{background:#1f2937;color:#e5e7eb}.dark .pc-table td{border-color:#374151}.pc-positive{color:#16a34a}.pc-negative{color:#dc2626}.pc-accent{color:#7c3aed}.pc-empty{padding:18px;text-align:center;color:#94a3b8;font-size:.78rem}
@media(max-width:900px){.pc-toolbar,.pc-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pc-mini-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.pc-toolbar,.pc-kpi-grid{grid-template-columns:1fr}.pc-mini-kpis{grid-template-columns:1fr}}
@media print{body.pc-print-mode header,body.pc-print-mode nav,body.pc-print-mode .sl-timeline-bar,body.pc-print-mode .sl-kpi-header,body.pc-print-mode .project-control-heading-actions,body.pc-print-mode .pc-toolbar{display:none!important}body.pc-print-mode .slview{display:none!important}body.pc-print-mode #slview-projectcontrol{display:block!important}body.pc-print-mode .project-control-shell{box-shadow:none!important;border:0!important;padding:0!important}body.pc-print-mode .pc-group.collapsed .pc-group-body{display:block!important}body.pc-print-mode .pc-kpi-header-check{display:none!important}}


/* V95 — Presence Planning: dedicated bottom horizontal scrollbar, synchronized
   with the real table viewport. It remains below the grid and controls the
   same scrollLeft used by arrows and drag auto-scroll. */
.presence-bottom-scroll{display:none;width:100%;height:18px;overflow-x:auto;overflow-y:hidden;margin-top:6px;border:1px solid #cbd5e1;border-radius:6px;background:#f8fafc;scrollbar-gutter:stable}
.presence-bottom-scroll.is-needed{display:block}
.presence-bottom-scroll-inner{height:1px;min-width:100%}
#resourceSubview-project.active{display:block!important}
#resourceSubview-project:not(.active){display:none!important}
#resourcesMasterContainer{display:block;min-height:48px}

/* V01b — draggable SiteLog tabs with Project Control locked in the center */
.sitelog-tabs-nav{overflow:visible!important}
.sitelog-tabs-shell{
  position:relative;
  width:100%;
  max-width:1600px;
  margin:0 auto;
  padding:0 12px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:end;
  gap:8px;
}
.sitelog-tabs-zone{
  min-width:0;
  display:flex;
  align-items:end;
  gap:2px;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
  scroll-behavior:smooth;
  padding-top:3px;
}
.sitelog-tabs-left{justify-content:flex-end}
.sitelog-tabs-right{justify-content:flex-start}
.sitelog-tabs-center{
  position:relative;
  z-index:3;
  display:flex;
  align-items:end;
  justify-content:center;
  min-width:max-content;
}
.sitelog-tabs-center .project-control-tab{
  cursor:pointer!important;
  user-select:none;
  box-shadow:0 2px 8px rgba(126,34,206,.18);
}
.sitelog-tabs-zone .nav-tab-sitelog{
  cursor:grab;
  user-select:none;
  flex:0 0 auto;
}
.sitelog-tabs-zone .nav-tab-sitelog:active{cursor:grabbing}
.sitelog-tabs-zone .nav-tab-sitelog.tab-dragging{
  opacity:.42;
  transform:scale(.97);
  box-shadow:none!important;
}
.sitelog-tabs-zone.tab-drag-over{
  background:rgba(143,35,122,.055);
  box-shadow:inset 0 -2px 0 rgba(143,35,122,.35);
}
.sitelog-tabs-zone .tab-drop-before{box-shadow:-3px 0 0 #8F237A!important}
.sitelog-tabs-zone .tab-drop-after{box-shadow:3px 0 0 #8F237A!important}
.sitelog-sync-badge{position:absolute;right:14px;top:50%;transform:translateY(-50%);z-index:5}
@media(max-width:1050px){
  .sitelog-tabs-shell{grid-template-columns:minmax(130px,1fr) auto minmax(130px,1fr);padding:0 6px;gap:4px}
  .sitelog-tabs-zone{max-width:calc(50vw - 105px)}
  .sitelog-tabs-center .project-control-tab{padding-left:10px;padding-right:10px}
}


/* v01c — Presence Planning Excel-style horizontal timeline scrollbar */
#slview-presence .presence-bottom-scroll{
  box-sizing:border-box;
  max-width:100%;
  height:17px;
  margin-top:5px;
  border-radius:4px;
  scrollbar-width:auto;
}
#slview-presence .presence-bottom-scroll-inner{height:1px;min-width:0!important}


/* ===== V01d — Excel-style SiteLog labels + proportional Presence scroll thumb ===== */
.sitelog-tabs-zone{
  --sitelog-tab-width: 128px;
  align-items:end;
  padding-top:7px;
  overflow-x:auto;
  overflow-y:visible;
}
.sitelog-tabs-zone .nav-tab-sitelog{
  flex:0 0 var(--sitelog-tab-width)!important;
  width:var(--sitelog-tab-width)!important;
  max-width:var(--sitelog-tab-width)!important;
  min-width:var(--sitelog-tab-width)!important;
  height:35px;
  margin:0 0 0 -7px!important;
  padding:7px 10px 6px!important;
  border:1px solid #b9c2cf!important;
  border-bottom-color:#8f9aaa!important;
  border-radius:7px 7px 0 0!important;
  box-shadow:0 -1px 3px rgba(15,23,42,.08), inset 0 1px 0 rgba(255,255,255,.78);
  text-align:center;
  overflow:hidden;
  text-overflow:ellipsis;
  position:relative;
  z-index:1;
  transform:none!important;
}
.sitelog-tabs-zone .nav-tab-sitelog:first-child{margin-left:0!important}
.sitelog-tabs-zone .nav-tab-sitelog:hover{
  z-index:3;
  transform:translateY(-2px)!important;
  box-shadow:0 -3px 7px rgba(15,23,42,.13), inset 0 1px 0 rgba(255,255,255,.9);
}
.sitelog-tabs-zone .nav-tab-sitelog.active{
  z-index:5;
  filter:saturate(.45) brightness(1.08)!important;
  color:#334155!important;
  border-color:#8793a2!important;
  border-bottom-color:#fff!important;
  box-shadow:0 -3px 8px rgba(15,23,42,.14), inset 0 2px 0 rgba(255,255,255,.95)!important;
  transform:translateY(-3px)!important;
}
.dark .sitelog-tabs-zone .nav-tab-sitelog{
  border-color:#475569!important;
  border-bottom-color:#64748b!important;
  box-shadow:0 -2px 5px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.08);
}
.dark .sitelog-tabs-zone .nav-tab-sitelog.active{
  filter:saturate(.42) brightness(.82)!important;
  color:#f8fafc!important;
  border-bottom-color:#111827!important;
}
.sitelog-tabs-center{z-index:10}
.sitelog-tabs-center .project-control-tab{margin-bottom:0!important}

/* The outer track remains full width. Only the draggable thumb changes size. */
#slview-presence .presence-bottom-scroll{
  display:none;
  position:relative;
  width:100%!important;
  max-width:none!important;
  height:18px;
  margin:6px 0 0!important;
  padding:2px;
  overflow:hidden!important;
  border:1px solid #aeb8c5;
  border-radius:4px;
  background:#e5e9ef;
  box-sizing:border-box;
  cursor:pointer;
  user-select:none;
  touch-action:none;
}
#slview-presence .presence-bottom-scroll.is-needed{display:block}
#slview-presence .presence-bottom-scroll-inner{
  position:absolute;
  left:2px;
  top:2px;
  height:12px!important;
  min-width:34px!important;
  width:34px;
  border:1px solid #7f8a98;
  border-radius:3px;
  background:linear-gradient(#fafafa,#cfd5dd);
  box-shadow:inset 0 1px 0 #fff,0 1px 1px rgba(15,23,42,.16);
  cursor:grab;
  transform:translateX(0);
}
#slview-presence .presence-bottom-scroll-inner:hover{background:linear-gradient(#fff,#c4cbd4)}
#slview-presence .presence-bottom-scroll-inner.is-dragging{cursor:grabbing;background:linear-gradient(#f8fafc,#b8c1cc)}
.dark #slview-presence .presence-bottom-scroll{background:#273244;border-color:#64748b}
.dark #slview-presence .presence-bottom-scroll-inner{background:linear-gradient(#64748b,#475569);border-color:#94a3b8;box-shadow:inset 0 1px 0 rgba(255,255,255,.18)}

/* vA04 — previous-week Presence confirmation reminder */
.presence-confirmation-popup{position:fixed;right:24px;top:92px;z-index:10050;display:flex;gap:14px;align-items:flex-start;width:min(440px,calc(100vw - 32px));padding:18px 44px 18px 18px;background:#fff7ed;border:2px solid #f97316;border-radius:14px;box-shadow:0 18px 48px rgba(15,23,42,.28);color:#7c2d12;animation:presence-confirmation-pulse 1.05s ease-in-out infinite}
.presence-confirmation-popup strong{display:block;font-size:1rem;margin-bottom:5px}.presence-confirmation-popup p{margin:0 0 12px;font-size:.84rem;line-height:1.4}.presence-confirmation-icon{flex:0 0 32px;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#ea580c;color:#fff;font-weight:800;font-size:1.15rem}.presence-confirmation-close{position:absolute;right:10px;top:8px;border:0;background:transparent;color:#9a3412;font-size:1.45rem;line-height:1;cursor:pointer}.presence-confirmation-review{border:0;border-radius:8px;padding:8px 12px;background:#c2410c;color:#fff;font-weight:700;cursor:pointer}.presence-confirmation-review:hover{background:#9a3412}@keyframes presence-confirmation-pulse{0%,100%{box-shadow:0 18px 48px rgba(15,23,42,.25);transform:translateY(0)}50%{box-shadow:0 18px 54px rgba(249,115,22,.55);transform:translateY(-2px)}}
@media (prefers-reduced-motion:reduce){.presence-confirmation-popup{animation:none}}

/* vA05 — pending weekly presence confirmation */
@keyframes presenceResourceUnconfirmedPulse {
  0%,100% { box-shadow: inset 0 0 0 2px rgba(220,38,38,.15); filter:none; }
  50% { box-shadow: inset 0 0 0 3px rgba(220,38,38,.85), 0 0 12px rgba(220,38,38,.35); filter:brightness(1.04); }
}
.presence-resource-row.presence-resource-unconfirmed-blink > td {
  animation: presenceResourceUnconfirmedPulse 1.15s ease-in-out infinite;
}
.presence-confirmation-actions { display:flex; gap:10px; align-items:center; margin-top:10px; flex-wrap:wrap; }
.presence-confirmation-ok { min-width:72px; border:1px solid #94a3b8; background:#fff; color:#334155; border-radius:7px; padding:7px 14px; font-weight:700; cursor:pointer; }
.presence-confirmation-ok:hover { background:#f8fafc; }


/* vA07 hotfix — hide the scrollbar below SiteLog tab labels without changing tab layout */
.sitelog-tabs-zone{scrollbar-width:none!important;-ms-overflow-style:none!important;}
.sitelog-tabs-zone::-webkit-scrollbar{display:none!important;width:0!important;height:0!important;}
.daily-rates-header-controls{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap;}
.daily-rates-currency-label{display:flex;align-items:center;gap:7px;font-size:.7rem;font-weight:800;color:#64748b;}
.daily-rates-currency-label select{min-width:92px;height:31px;padding-top:4px;padding-bottom:4px;}
.dark .daily-rates-currency-label{color:#cbd5e1;}

/* ================= E80 ONE Ai Pot (24/07) ================= */
.aipot-chips{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
.aipot-chip{font-size:.7rem;padding:4px 10px;border-radius:999px;border:1px solid rgba(148,163,184,.4);background:#f8fafc;color:#334155;cursor:pointer;transition:background .15s}
.aipot-chip:hover{background:#e2e8f0}
.dark .aipot-chip{background:#1e293b;color:#cbd5e1;border-color:rgba(148,163,184,.25)}
.dark .aipot-chip:hover{background:#334155}
.aipot-chat{display:flex;flex-direction:column;gap:10px;min-height:260px;max-height:52vh;overflow-y:auto;padding:12px;border:1px solid rgba(148,163,184,.28);border-radius:10px;background:#f9fafb}
.dark .aipot-chat{background:#0f172a;border-color:rgba(148,163,184,.18)}
.aipot-chat-empty{color:#94a3b8;font-size:.8rem;text-align:center;margin:auto}
.aipot-msg{max-width:78%;padding:9px 13px;border-radius:12px;font-size:.82rem;line-height:1.45;white-space:pre-wrap;word-break:break-word}
.aipot-msg-user{align-self:flex-end;background:#2563eb;color:#fff;border-bottom-right-radius:3px}
.aipot-msg-assistant{align-self:flex-start;background:#e5e7eb;color:#111827;border-bottom-left-radius:3px}
.dark .aipot-msg-assistant{background:#1e293b;color:#e2e8f0}
.aipot-msg-system{align-self:center;background:transparent;color:#94a3b8;font-size:.72rem;font-style:italic;max-width:95%;text-align:center}
.aipot-msg-meta{display:block;font-size:.62rem;opacity:.65;margin-top:3px}
.aipot-msg-thinking{align-self:flex-start;display:flex;gap:4px;padding:10px 14px}
.aipot-msg-thinking span{width:6px;height:6px;border-radius:50%;background:#94a3b8;animation:aipotBlink 1.1s infinite ease-in-out}
.aipot-msg-thinking span:nth-child(2){animation-delay:.15s}
.aipot-msg-thinking span:nth-child(3){animation-delay:.3s}
@keyframes aipotBlink{0%,80%,100%{opacity:.25}40%{opacity:1}}
.aipot-inputbar{display:flex;gap:8px;margin-top:12px;align-items:flex-end}
.aipot-input{flex:1;resize:none;min-height:40px;max-height:120px;padding:9px 12px;border-radius:8px;border:1px solid rgba(148,163,184,.4);font-size:.82rem;background:#fff;color:#111827}
.dark .aipot-input{background:#111827;color:#e5e7eb;border-color:rgba(148,163,184,.25)}
.aipot-error{font-size:.72rem;color:#dc2626;margin:6px 0 0}

/* ================= Presence table: frozen columns + single scrollbar (24/07, new batch) ================= */
/* Point 2: leading identification columns stay pinned while scrolling
   through the (now full-project-length) day columns. Offsets are computed
   and written per-cell by presApplyFrozenColumns() in app.js, since column
   widths are dynamic. */
/* Point 2 fix (24/07, batch 2): the frozen leading-column headers (System/
   Resources, Skill, Total Presence, the X/T/R/H/O legend chips, etc.) sit
   in the SAME header row as the date/week headers, which carry a generic
   `#presenceTable thead th{...z-index:81!important}` rule elsewhere. Equal
   z-index ties resolve by DOM order, and the date/week header cells come
   LATER in the row's markup, so they painted on top of the frozen cells
   while scrolling horizontally -- looking like the frozen headers had
   turned transparent. Give the frozen header cells a higher, more specific
   z-index (ID+type+class beats the ID+type rule) and an explicit opaque
   background so nothing can show through underneath them.
*/
#presenceTable thead th.pres-frozen-cell-head{z-index:90!important;background:#fff!important;opacity:1!important}
.dark #presenceTable thead th.pres-frozen-cell-head{background:#111827!important}
#presenceTable tbody td.pres-frozen-cell,#presenceTable tbody th.pres-frozen-cell{background-color:#fff}
.dark #presenceTable tbody td.pres-frozen-cell,.dark #presenceTable tbody th.pres-frozen-cell{background-color:#111827}
/* subtle right-edge shadow so it reads as a distinct frozen pane, like
   Excel/Google Sheets */
#presenceTable .pres-frozen-cell:not(.pres-frozen-cell-head)::after{content:'';position:absolute;top:0;right:-4px;bottom:0;width:4px;pointer-events:none}

/* Point 5 CORRECTION (24/07): the user wants to keep the NATIVE scrollbar
   (the one that is part of the table's own scroll area) and remove the
   CUSTOM "Excel-style" bar that sits OUTSIDE/below the table -- the
   opposite of what was tried before. Re-enable the native scrollbar and
   hide the custom bottom bar instead. */
#presenceBottomScroll{display:none!important}

/* Companion for presFixStickyHeaderOverlap(): keeps any scrollIntoView-driven
   jump (Today/Prev/Next buttons, presence confirmation popup review, etc.)
   from landing a row underneath the sticky 2-row header. */
#presenceTable tbody tr,#presenceTable tbody td,#presenceTable .presence-cell{scroll-margin-top:var(--pres-header-h,108px)}

/* ================= Demo Projects panel (24/07) ================= */
.demo-projects-overlay{position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:200;padding:20px;align-items:center;justify-content:center}
.demo-projects-overlay:not(.hidden){display:flex}
#demoProjectsGrid.card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px}
#demoProjectsGrid .pt-card{border:1px solid #e5e7eb;border-radius:10px;padding:12px 14px;background:#f8fafc;transition:box-shadow .15s,transform .15s}
#demoProjectsGrid .pt-card:hover{box-shadow:0 4px 14px rgba(0,0,0,.1);transform:translateY(-1px);border-color:#a855f7}
.dark #demoProjectsGrid .pt-card{background:#111827;border-color:#374151}
#demoProjectsGrid .pt-card-title{font-weight:700;font-size:.85rem;color:#111827;margin-bottom:2px}
.dark #demoProjectsGrid .pt-card-title{color:#f3f4f6}
#demoProjectsGrid .pt-card-sub{font-size:.72rem;color:#6b7280}
.dark #demoProjectsGrid .pt-card-sub{color:#9ca3af}

/* ================= Presence color picker popover (24/07, batch 2) ================= */
.pres-color-popover{position:fixed;z-index:500;background:#fff;border:1px solid #cbd5e1;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.18);padding:6px;display:grid;grid-template-columns:repeat(6,20px);gap:5px}
.dark .pres-color-popover{background:#1f2937;border-color:#374151}
.pres-color-swatch{width:20px;height:20px;border-radius:4px;border:1px solid rgba(0,0,0,.15);cursor:pointer;padding:0}
.pres-color-swatch:hover{transform:scale(1.12)}
.pres-color-swatch.is-current{box-shadow:0 0 0 2px #2563eb}

/* Presence Planning input mode selector and keyboard active-cell state */
.presence-input-mode-setting{display:flex;align-items:center;gap:6px;white-space:nowrap}
#presenceTable .presence-cell.presence-keyboard-selected,
#presenceTable .presence-activity-cell.presence-keyboard-selected{
  outline:2px solid #f59e0b!important;
  outline-offset:1px;
  box-shadow:0 0 0 2px rgba(245,158,11,.28)!important;
  position:relative;
  z-index:8!important;
}


/* ================= Presence Planning frozen pane — v106 unified fix =================
   Header and body now use the same opaque paint layer and deterministic stack.
   Only the final frozen cell draws the Excel-style divider, avoiding seams
   between the individual frozen columns. */
#presenceTable .pres-frozen-cell{
  position:sticky!important;
  background:var(--pres-frozen-bg,#fff)!important;
  background-color:var(--pres-frozen-bg,#fff)!important;
  background-image:none!important;
  background-clip:padding-box!important;
  opacity:1!important;
  isolation:isolate;
}
#presenceTable tbody td.pres-frozen-cell,
#presenceTable tbody th.pres-frozen-cell{
  z-index:42!important;
}
#presenceTable thead th.pres-frozen-cell-head{
  z-index:102!important;
}
#presenceTable .pres-frozen-cell::after{
  content:none!important;
}
#presenceTable .pres-frozen-cell-edge::after{
  content:''!important;
  position:absolute;
  z-index:2;
  top:0;
  right:-7px;
  bottom:0;
  width:7px;
  pointer-events:none;
  background:linear-gradient(to right,rgba(15,23,42,.16),rgba(15,23,42,0));
}
#presenceTable tbody tr.presence-row-selected .pres-frozen-cell{
  background:var(--pres-frozen-bg,#fff)!important;
}
.dark #presenceTable .pres-frozen-cell{
  background:var(--pres-frozen-bg,#111827)!important;
  background-color:var(--pres-frozen-bg,#111827)!important;
}

/* ===== v106.4 — SiteLog tabs: content-width labels + stronger active state ===== */
.sitelog-tabs-zone{
  --sitelog-tab-width:auto;
  gap:4px!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  padding-left:2px;
  padding-right:2px;
}
.sitelog-tabs-zone .nav-tab-sitelog{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:max-content!important;
  max-width:none!important;
  height:35px;
  margin:0!important;
  padding:7px 12px 6px!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:nowrap!important;
  filter:saturate(1.22) brightness(.99)!important;
  font-weight:750!important;
  border-color:color-mix(in srgb,currentColor 28%,#cbd5e1)!important;
  box-shadow:0 -1px 4px rgba(15,23,42,.10),inset 0 1px 0 rgba(255,255,255,.86)!important;
}
.sitelog-tabs-zone .nav-tab-sitelog:hover{
  filter:saturate(1.38) brightness(1.03)!important;
  transform:translateY(-2px)!important;
  box-shadow:0 -3px 8px rgba(15,23,42,.16),inset 0 1px 0 rgba(255,255,255,.94)!important;
}
.sitelog-tabs-zone .nav-tab-sitelog.active{
  filter:saturate(1.05) brightness(1.18)!important;
  color:#111827!important;
  font-weight:900!important;
  border-color:color-mix(in srgb,currentColor 48%,#94a3b8)!important;
  border-bottom-color:#ffffff!important;
  box-shadow:0 -4px 10px rgba(15,23,42,.20),inset 0 3px 0 rgba(255,255,255,.96)!important;
  transform:translateY(-3px)!important;
}
.sitelog-tabs-center .project-control-tab{
  width:auto!important;
  min-width:max-content!important;
  max-width:none!important;
  padding-left:14px!important;
  padding-right:14px!important;
  filter:saturate(1.25) brightness(1.01)!important;
}
.sitelog-tabs-center .project-control-tab.active{
  filter:saturate(1.05) brightness(1.18)!important;
  color:#4c1d95!important;
  font-weight:900!important;
  border-bottom-color:#fff!important;
  box-shadow:0 -4px 11px rgba(126,34,206,.26),inset 0 3px 0 rgba(255,255,255,.96)!important;
  transform:translateY(-3px)!important;
}
.dark .sitelog-tabs-zone .nav-tab-sitelog{
  filter:saturate(1.1) brightness(.72)!important;
  color:#f8fafc!important;
}
.dark .sitelog-tabs-zone .nav-tab-sitelog.active,
.dark .sitelog-tabs-center .project-control-tab.active{
  filter:saturate(1.18) brightness(.98)!important;
  color:#ffffff!important;
  border-bottom-color:#111827!important;
}
@media(max-width:1050px){
  .sitelog-tabs-zone .nav-tab-sitelog{padding-left:10px!important;padding-right:10px!important}
}

/* ===== v106.5 — SiteLog tabs: Project Control activation logic, individual colors =====
   Color-only refinement: dimensions, shape, spacing and typography remain unchanged. */
.sitelog-tabs-zone .nav-tab-sitelog{
  --sl-tab-main:#475569;
  --sl-tab-dark:#334155;
  --sl-tab-soft:#f1f5f9;
  --sl-tab-ink:#334155;
  background:var(--sl-tab-soft)!important;
  color:var(--sl-tab-ink)!important;
  border-color:color-mix(in srgb,var(--sl-tab-main) 30%,transparent)!important;
}
.sitelog-tabs-zone .nav-tab-sitelog[data-slview="overview"]{--sl-tab-main:#16a34a;--sl-tab-dark:#047857;--sl-tab-soft:#dcfce7;--sl-tab-ink:#166534}
.sitelog-tabs-zone .nav-tab-sitelog[data-slview="presence"]{--sl-tab-main:#2563eb;--sl-tab-dark:#1d4ed8;--sl-tab-soft:#dbeafe;--sl-tab-ink:#1e40af}
.sitelog-tabs-zone .nav-tab-sitelog[data-slview="gantt"]{--sl-tab-main:#7c3aed;--sl-tab-dark:#6d28d9;--sl-tab-soft:#ede9fe;--sl-tab-ink:#5b21b6}
.sitelog-tabs-zone .nav-tab-sitelog[data-slview="turnkey"]{--sl-tab-main:#f97316;--sl-tab-dark:#ea580c;--sl-tab-soft:#ffedd5;--sl-tab-ink:#c2410c}
.sitelog-tabs-zone .nav-tab-sitelog[data-slview="extracosts"]{--sl-tab-main:#ef4444;--sl-tab-dark:#dc2626;--sl-tab-soft:#fee2e2;--sl-tab-ink:#b91c1c}
.sitelog-tabs-zone .nav-tab-sitelog[data-slview="commissioning"]{--sl-tab-main:#0891b2;--sl-tab-dark:#0e7490;--sl-tab-soft:#cffafe;--sl-tab-ink:#155e75}
.sitelog-tabs-zone .nav-tab-sitelog[data-slview="needs"]{--sl-tab-main:#ca8a04;--sl-tab-dark:#a16207;--sl-tab-soft:#fef9c3;--sl-tab-ink:#854d0e}
.sitelog-tabs-zone .nav-tab-sitelog[data-slview="budgetods"]{--sl-tab-main:#059669;--sl-tab-dark:#047857;--sl-tab-soft:#d1fae5;--sl-tab-ink:#065f46}
.sitelog-tabs-zone .nav-tab-sitelog[data-slview="delayanalysis"]{--sl-tab-main:#e11d48;--sl-tab-dark:#be123c;--sl-tab-soft:#ffe4e6;--sl-tab-ink:#9f1239}
.sitelog-tabs-zone .nav-tab-sitelog[data-slview="resources"]{--sl-tab-main:#4f46e5;--sl-tab-dark:#4338ca;--sl-tab-soft:#e0e7ff;--sl-tab-ink:#3730a3}
.sitelog-tabs-zone .nav-tab-sitelog[data-slview="weeklynotes"]{--sl-tab-main:#c026d3;--sl-tab-dark:#a21caf;--sl-tab-soft:#fae8ff;--sl-tab-ink:#86198f}
.sitelog-tabs-zone .nav-tab-sitelog[data-slview="layout"]{--sl-tab-main:#64748b;--sl-tab-dark:#475569;--sl-tab-soft:#e2e8f0;--sl-tab-ink:#334155}
.sitelog-tabs-zone .nav-tab-sitelog[data-slview="settings"]{--sl-tab-main:#374151;--sl-tab-dark:#1f2937;--sl-tab-soft:#e5e7eb;--sl-tab-ink:#1f2937}
.sitelog-tabs-zone .nav-tab-sitelog[data-slview="aipot"]{--sl-tab-main:#0d9488;--sl-tab-dark:#0f766e;--sl-tab-soft:#ccfbf1;--sl-tab-ink:#115e59}

.sitelog-tabs-zone .nav-tab-sitelog:hover{
  background:linear-gradient(135deg,var(--sl-tab-main),var(--sl-tab-dark))!important;
  color:#fff!important;
  border-color:color-mix(in srgb,var(--sl-tab-main) 72%,#fff)!important;
  box-shadow:0 3px 10px color-mix(in srgb,var(--sl-tab-main) 30%,transparent)!important;
}
.sitelog-tabs-zone .nav-tab-sitelog.active{
  background:linear-gradient(135deg,var(--sl-tab-main),var(--sl-tab-dark))!important;
  color:#fff!important;
  border-color:color-mix(in srgb,var(--sl-tab-main) 70%,#fff)!important;
  border-bottom-color:transparent!important;
  box-shadow:0 4px 12px color-mix(in srgb,var(--sl-tab-main) 42%,transparent),inset 0 1px 0 rgba(255,255,255,.30)!important;
}
.dark .sitelog-tabs-zone .nav-tab-sitelog{
  background:color-mix(in srgb,var(--sl-tab-main) 28%,#111827)!important;
  color:color-mix(in srgb,var(--sl-tab-soft) 88%,#fff)!important;
  border-color:color-mix(in srgb,var(--sl-tab-main) 55%,#111827)!important;
}
.dark .sitelog-tabs-zone .nav-tab-sitelog:hover,
.dark .sitelog-tabs-zone .nav-tab-sitelog.active{
  background:linear-gradient(135deg,var(--sl-tab-main),var(--sl-tab-dark))!important;
  color:#fff!important;
  border-color:color-mix(in srgb,var(--sl-tab-main) 76%,#fff)!important;
  border-bottom-color:transparent!important;
  box-shadow:0 4px 14px color-mix(in srgb,var(--sl-tab-main) 50%,transparent),inset 0 1px 0 rgba(255,255,255,.24)!important;
}


/* v106.7 — Presence Planning hold-to-pan navigation (right mouse button). */
.presence-table-stage { position: relative; }
.presence-table-stage.presence-hold-navigating,
.presence-table-stage.presence-hold-navigating * { cursor: grabbing !important; user-select: none !important; }
.presence-hold-nav-overlay {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%) scale(.94);
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 360px;
  min-height: 82px;
  padding: 18px 42px;
  border: 2px solid rgba(255,255,255,.42);
  border-radius: 22px;
  background: rgba(17,24,39,.30);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .045em;
  text-align: center;
  text-shadow: 0 2px 7px rgba(0,0,0,.55);
  box-shadow: 0 12px 34px rgba(0,0,0,.28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .10s ease, transform .10s ease, visibility 0s linear .10s;
}
.presence-hold-nav-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%,-50%) scale(1);
  transition-delay: 0s;
}


/* ============================================================
   v106.10 — Presence toolbar simplification and details expansion
   ============================================================ */
/* Removed week arrows/date/dropdown leave no phantom center spacing. */
#slview-presence .presence-week-center{display:none!important}
#slview-presence .presence-toolbar{grid-template-columns:auto 1fr auto!important}

/* Show Details must reveal real, readable columns and physically push the
   calendar to the right. Detail cells are never overlaid on the planning. */
#presenceTable thead th.pres-detail-col,
#presenceTable tbody td.pres-detail-col{
  min-width:118px!important;
  width:118px!important;
  max-width:160px!important;
  padding:5px 7px!important;
  font-size:.66rem!important;
  line-height:1.2!important;
  writing-mode:horizontal-tb!important;
  text-orientation:mixed!important;
  transform:none!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  word-break:normal!important;
  overflow-wrap:anywhere!important;
}
#presenceTable thead th.pres-detail-col{font-weight:800!important;vertical-align:middle!important}
#presenceTable tbody td.pres-detail-col select,
#presenceTable tbody td.pres-detail-col input{
  min-width:104px!important;
  width:100%!important;
  height:26px!important;
  padding:3px 5px!important;
  font-size:.65rem!important;
  white-space:normal!important;
}
#presenceTable .pres-total-col{
  min-width:70px!important;
  width:70px!important;
  font-size:.62rem!important;
}
/* Keep the calendar cells at their established width: configured 5–10 week
   minimums therefore remain predictable even for a one-week project. */
#presenceTable .pres-day-head,
#presenceTable tbody td[data-pres-cell],
#presenceTable tbody td[data-pres-act-cell]{
  width:32px!important;
  min-width:32px!important;
  max-width:32px!important;
}

/* v106.11 — restore the explicit This Week control. */
#slview-presence .presence-week-center{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  height:30px!important;
  visibility:visible!important;
}
#slview-presence #presTodayWeek{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:82px!important;
  height:28px!important;
  font-size:.72rem!important;
  font-weight:700!important;
}

/* ===== V107 PROJECT CONTROL V2 — PRESENTATION-ONLY DESIGN LAYER ===== */
#slview-projectcontrol .project-control-shell{background:#f4f6f8!important;border:1px solid #e1e6ec;box-shadow:none!important;padding:18px!important}.dark #slview-projectcontrol .project-control-shell{background:#101316!important;border-color:#2c3238}
.pcv2-root{--pc-bg:#f4f6f8;--pc-card:#fff;--pc-soft:#f8fafc;--pc-text:#15202b;--pc-muted:#6b7684;--pc-line:#dce2e8;--pc-shadow:0 8px 24px rgba(27,39,55,.07);color:var(--pc-text)}
.dark .pcv2-root{--pc-bg:#101316;--pc-card:#1a1e22;--pc-soft:#22272c;--pc-text:#f3f6f8;--pc-muted:#9ca7b1;--pc-line:#343b42;--pc-shadow:0 10px 25px rgba(0,0,0,.19)}
.pcv2-commandbar{background:#080a0c;border:1px solid #292e34;border-radius:14px;padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px;color:#fff}.pcv2-project{display:flex;flex-direction:column}.pcv2-project small{font-size:.59rem;color:#89939e;letter-spacing:.12em;font-weight:800}.pcv2-project b{font-size:.9rem;margin-top:2px}.pcv2-command-actions{display:flex;gap:8px}.pcv2-btn{border:1px solid #3b424a;background:#171b1f;color:#e9edf0;padding:7px 11px;border-radius:8px;font-size:.68rem;font-weight:800;cursor:pointer}.pcv2-btn:hover{background:#23292f}.pcv2-btn.primary{background:#275d9b;border-color:#3974b9;color:#fff}
.pcv2-customizer{display:none;background:#111519;color:#eef2f5;border:1px solid #343b42;border-radius:14px;padding:14px;margin-bottom:12px}.pcv2-customizer.open{display:block}.pcv2-customizer-head{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid #30363d;padding-bottom:10px;margin-bottom:12px}.pcv2-customizer-head b{font-size:.8rem}.pcv2-customizer-head small{display:block;color:#919ca7;font-size:.66rem;margin-top:3px}.pcv2-icon-btn{border:0;background:transparent;color:#ccd3d9;font-size:1.25rem;cursor:pointer}.pcv2-config-columns{display:grid;grid-template-columns:1fr 1.4fr;gap:18px}.pcv2-config-columns h4{font-size:.64rem;text-transform:uppercase;letter-spacing:.08em;color:#8f9aa5;margin:0 0 8px}.pcv2-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.pcv2-header-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.pcv2-check{display:flex;align-items:center;gap:7px;padding:7px 8px;border:1px solid #30363d;border-radius:8px;background:#181d22;font-size:.66rem;cursor:pointer}.pcv2-check input{accent-color:#4f8dcc}
.pcv2-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:12px}.pcv2-kpi{--accent:#315f9d;background:var(--pc-card);border:1px solid var(--pc-line);border-radius:13px;padding:13px 13px 12px;box-shadow:var(--pc-shadow);position:relative;overflow:hidden;min-height:124px}.pcv2-kpi:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--accent)}.pcv2-kpi-green{--accent:#3b7c67}.pcv2-kpi-amber{--accent:#ad722b}.pcv2-kpi-violet{--accent:#76558e}.pcv2-kpi-teal{--accent:#31787d}.pcv2-kpi-red{--accent:#a84a4a}.pcv2-kpi-top{display:flex;justify-content:space-between;gap:6px;align-items:center}.pcv2-kpi small{font-size:.63rem;text-transform:uppercase;letter-spacing:.045em;color:var(--pc-muted);font-weight:800}.pcv2-kpi strong{display:block;font-size:1.28rem;margin:12px 0 9px}.pcv2-kpi p{font-size:.64rem;color:var(--pc-muted);margin:7px 0 0}.pcv2-help{width:19px;height:19px;border-radius:50%;border:1px solid var(--pc-line);background:var(--pc-soft);color:var(--pc-muted);font-size:.62rem;font-weight:900;cursor:pointer}.pcv2-kpi.show-help p{color:var(--pc-text);font-weight:700}.pcv2-progress{height:6px;border-radius:99px;background:var(--pc-soft);overflow:hidden}.pcv2-progress span{display:block;height:100%;border-radius:99px;background:var(--accent)}
.pcv2-viewbar{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr)) auto;gap:9px;align-items:end;background:var(--pc-card);border:1px solid var(--pc-line);border-radius:12px;padding:10px;margin-bottom:12px}.pcv2-viewbar label{font-size:.59rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:var(--pc-muted)}.pcv2-viewbar select{display:block;width:100%;margin-top:4px;border:1px solid var(--pc-line);border-radius:7px;padding:6px 7px;background:var(--pc-soft);color:var(--pc-text);font-size:.68rem}.pcv2-readonly{align-self:center;display:flex;align-items:center;gap:6px;font-size:.59rem;font-weight:900;color:#4b7e69;white-space:nowrap}.pcv2-readonly span{width:7px;height:7px;border-radius:50%;background:#4b8a70}
.pcv2-flow-panel,.pcv2-section{background:var(--pc-card);border:1px solid var(--pc-line);border-radius:13px;margin-bottom:10px;box-shadow:var(--pc-shadow)}.pcv2-panel-head{display:flex;justify-content:space-between;align-items:center;padding:13px 14px;border-bottom:1px solid var(--pc-line)}.pcv2-panel-head b{font-size:.79rem}.pcv2-panel-head small{display:block;font-size:.64rem;color:var(--pc-muted);margin-top:2px}.pcv2-panel-head>span{font-size:.61rem;color:var(--pc-muted)}.pcv2-flow{display:flex;align-items:center;gap:7px;padding:14px;overflow-x:auto}.pcv2-flow-node{min-width:112px;flex:1;background:var(--pc-soft);border:1px solid var(--pc-line);border-radius:10px;padding:10px;text-align:center}.pcv2-flow-node.is-primary{border-color:#5a7fa9;background:color-mix(in srgb,#315f9d 10%,var(--pc-card))}.pcv2-flow-node small{color:var(--pc-muted);font-size:.61rem;text-transform:uppercase;font-weight:800}.pcv2-flow-node strong{display:block;font-size:.82rem;margin-top:4px}.pcv2-flow-arrow{color:var(--pc-muted);font-weight:900}
.pcv2-section{overflow:hidden}.pcv2-section-head{width:100%;border:0;background:transparent;color:inherit;padding:12px 14px;display:flex;justify-content:space-between;align-items:center;gap:10px;text-align:left;cursor:pointer}.pcv2-section-identity{display:flex;align-items:center;gap:10px}.pcv2-section-mark{width:4px;height:30px;border-radius:99px;background:#315f9d}.pcv2-caf{background:#3b7c67}.pcv2-resources{background:#647b99}.pcv2-travel{background:#76558e}.pcv2-po{background:#31787d}.pcv2-dynamic{background:#ad722b}.pcv2-section-identity b{font-size:.76rem}.pcv2-section-identity small{display:block;color:var(--pc-muted);font-size:.63rem;margin-top:2px}.pcv2-section-right{display:flex;align-items:center;gap:10px}.pcv2-section-right em{font-style:normal;color:var(--pc-muted);font-size:.65rem}.pcv2-chevron{transition:.18s;font-size:1rem}.pcv2-section.collapsed .pcv2-chevron{transform:rotate(-90deg)}.pcv2-section-body{border-top:1px solid var(--pc-line);padding:12px 14px}.pcv2-section.collapsed .pcv2-section-body{display:none}
.pcv2-mini-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-bottom:11px}.pcv2-mini{background:var(--pc-soft);border:1px solid var(--pc-line);border-radius:9px;padding:9px}.pcv2-mini small{font-size:.59rem;color:var(--pc-muted);text-transform:uppercase;font-weight:800}.pcv2-mini strong{display:block;font-size:.84rem;margin-top:4px}.pcv2-table-wrap{overflow:auto;border:1px solid var(--pc-line);border-radius:9px}.pcv2-table{width:100%;border-collapse:collapse;font-size:.66rem}.pcv2-table th{background:var(--pc-soft);color:var(--pc-muted);font-size:.58rem;text-transform:uppercase;letter-spacing:.04em;text-align:left;padding:8px;white-space:nowrap}.pcv2-table td{padding:8px;border-top:1px solid var(--pc-line);white-space:nowrap}.pcv2-empty{text-align:center;color:var(--pc-muted);padding:18px!important}.pcv2-analysis-note{background:var(--pc-soft);border:1px solid var(--pc-line);border-radius:9px;padding:12px}.pcv2-analysis-note b{text-transform:capitalize}.pcv2-analysis-note p{font-size:.67rem;color:var(--pc-muted);margin:4px 0 0}
.pcv2-root.is-compact .pcv2-kpi{min-height:105px;padding:10px}.pcv2-root.is-compact .pcv2-section-head{padding:9px 12px}.pcv2-root.is-compact .pcv2-section-body{padding:9px 12px}.pcv2-root.is-compact .pcv2-table td,.pcv2-root.is-compact .pcv2-table th{padding:6px}
@media(max-width:1150px){.pcv2-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.pcv2-viewbar{grid-template-columns:repeat(2,minmax(0,1fr))}.pcv2-readonly{grid-column:1/-1}.pcv2-header-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.pcv2-commandbar{align-items:flex-start;flex-direction:column}.pcv2-config-columns{grid-template-columns:1fr}.pcv2-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pcv2-mini-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pcv2-flow-arrow{display:none}.pcv2-flow{display:grid;grid-template-columns:repeat(2,minmax(120px,1fr))}.pcv2-section-right em{display:none}}
@media(max-width:480px){.pcv2-kpi-grid,.pcv2-viewbar,.pcv2-check-grid,.pcv2-header-grid{grid-template-columns:1fr}.pcv2-command-actions{width:100%}.pcv2-btn{flex:1}.pcv2-mini-grid,.pcv2-flow{grid-template-columns:1fr}}
@media print{body.pc-print-mode .pcv2-commandbar,body.pc-print-mode .pcv2-customizer,body.pc-print-mode .pcv2-viewbar{display:none!important}body.pc-print-mode .pcv2-section.collapsed .pcv2-section-body{display:block!important}}

/* ===== V108 PROJECT CONTROL — INTERACTIVE READ-ONLY EXPLORATION ===== */
.pcv2-command-actions{display:flex;gap:8px;flex-wrap:wrap}
.pcv2-btn.is-saved{border-color:#4a9b78!important;color:#8de0b8!important;background:rgba(57,130,96,.16)!important}
.pcv2-flow-node{font:inherit;color:inherit;cursor:pointer;appearance:none;text-align:left;transition:transform .16s ease,border-color .16s ease,background .16s ease}
.pcv2-flow-node:hover{transform:translateY(-2px);border-color:rgba(91,151,220,.65)}
.pcv2-flow-node em{display:block;margin-top:8px;font-size:10px;font-style:normal;opacity:.55;text-transform:uppercase;letter-spacing:.08em}
.pcv2-kpi{cursor:default}.pcv2-kpi:after{content:'Double-click for detail';position:absolute;right:12px;bottom:8px;font-size:9px;letter-spacing:.05em;text-transform:uppercase;opacity:0;transition:opacity .15s}.pcv2-kpi:hover:after{opacity:.45}
.pcv2-table tbody tr{cursor:default}.pcv2-table tbody tr:hover{background:rgba(80,130,190,.08)}
.pcv2-drawer-backdrop{position:fixed;inset:0;z-index:99999;background:rgba(3,7,12,.58);display:flex;justify-content:flex-end;backdrop-filter:blur(3px);animation:pcv2Fade .16s ease}
.pcv2-drawer{height:100%;width:min(560px,94vw);background:var(--surface,#fff);color:var(--text,#18212b);border-left:1px solid var(--border,#dfe5eb);box-shadow:-22px 0 60px rgba(0,0,0,.22);display:flex;flex-direction:column;animation:pcv2Slide .2s ease}
.dark .pcv2-drawer,.dark-mode .pcv2-drawer,body.dark .pcv2-drawer{background:#171b20;color:#edf2f7;border-color:#303741}
.pcv2-drawer-head{padding:22px 22px 18px;border-bottom:1px solid rgba(125,140,155,.22);display:flex;justify-content:space-between;gap:16px}.pcv2-drawer-head h3{font-size:24px;margin:8px 0 5px}.pcv2-drawer-head p{margin:0;opacity:.62;font-size:13px}.pcv2-breadcrumb{font-size:11px;text-transform:uppercase;letter-spacing:.08em;opacity:.58}.pcv2-breadcrumb span{margin:0 7px}
.pcv2-drawer-content{padding:22px;overflow:auto;flex:1}.pcv2-drawer-foot{padding:14px 22px;border-top:1px solid rgba(125,140,155,.22);display:flex;justify-content:space-between;align-items:center;gap:12px}.pcv2-drawer-foot span{font-size:10px;letter-spacing:.08em;opacity:.62}.pcv2-drawer-foot i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#4fa77e;margin-right:7px}
.pcv2-drill-value{font-size:38px;font-weight:750;margin:4px 0 22px}.pcv2-drill-grid,.pcv2-record-list{display:grid;gap:10px}.pcv2-drill-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pcv2-drill-grid>div,.pcv2-record-list>div,.pcv2-flow-explain{padding:14px;border:1px solid rgba(125,140,155,.24);border-radius:12px;background:rgba(125,140,155,.06)}.pcv2-drill-grid small,.pcv2-record-list small{display:block;opacity:.58;margin-bottom:6px}.pcv2-flow-explain{display:flex;flex-direction:column;gap:8px}.pcv2-flow-explain span{opacity:.68;line-height:1.5}
@keyframes pcv2Fade{from{opacity:0}to{opacity:1}}@keyframes pcv2Slide{from{transform:translateX(30px);opacity:.5}to{transform:none;opacity:1}}
@media(max-width:640px){.pcv2-drill-grid{grid-template-columns:1fr}.pcv2-drawer-head,.pcv2-drawer-content,.pcv2-drawer-foot{padding-left:16px;padding-right:16px}}

/* ===== V109 PROJECT CONTROL — UNIVERSAL READ-ONLY DATA EXPLORER ===== */
.pcx-root{--pcx-accent:#3b82f6;display:grid;gap:14px}.pcx-command{background:#080a0d;color:#fff;border:1px solid #242a31;border-radius:16px;padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.pcx-command small{display:block;color:#929daa;font-size:10px;letter-spacing:.12em}.pcx-command b{font-size:17px}.pcx-command-actions{display:flex;gap:8px;flex-wrap:wrap}.pcx-btn{border:1px solid #39414b;background:#171b20;color:#fff;padding:8px 11px;border-radius:9px;font-size:12px;font-weight:700}.pcx-btn:hover{background:#222831}.pcx-btn.primary{background:#235f9f;border-color:#3578be}.pcx-readonly{display:flex;align-items:center;gap:7px;color:#9da8b4;font-size:10px;font-weight:800;letter-spacing:.09em}.pcx-readonly i{width:7px;height:7px;border-radius:50%;background:#34d399;box-shadow:0 0 0 4px rgba(52,211,153,.12)}
.pcx-kpis{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:10px}.pcx-kpi{position:relative;border:1px solid var(--pcv2-border,#dbe2ea);background:var(--pcv2-card,#fff);border-radius:14px;padding:13px 14px;overflow:hidden;cursor:pointer}.pcx-kpi:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--tone,#3b82f6)}.pcx-kpi small{display:block;color:#778391;font-size:11px}.pcx-kpi strong{display:block;font-size:21px;margin-top:7px}.pcx-kpi span{display:block;color:#87919c;font-size:10px;margin-top:5px}.dark .pcx-kpi{background:#181c21;border-color:#313840}.dark .pcx-kpi small,.dark .pcx-kpi span{color:#9ba5b0}
.pcx-panel{border:1px solid #dbe2ea;background:#fff;border-radius:16px;overflow:hidden}.dark .pcx-panel{border-color:#30373f;background:#171b1f}.pcx-panel-head{padding:13px 15px;border-bottom:1px solid #e2e7ed;display:flex;align-items:center;justify-content:space-between;gap:10px}.dark .pcx-panel-head{border-color:#30373f}.pcx-panel-head small{display:block;color:#7c8793;margin-top:2px}.pcx-panel-body{padding:14px 15px}.pcx-filter-grid{display:grid;grid-template-columns:repeat(6,minmax(130px,1fr));gap:9px}.pcx-field{display:grid;gap:5px;font-size:10px;font-weight:800;color:#6e7985;text-transform:uppercase;letter-spacing:.04em}.pcx-field select,.pcx-field input{width:100%;border:1px solid #cfd7df;background:#fff;color:#18212b;border-radius:9px;padding:8px 9px;font-size:12px;text-transform:none;font-weight:600;letter-spacing:0}.dark .pcx-field select,.dark .pcx-field input{background:#20252a;border-color:#39414a;color:#eef2f5}.pcx-checks{display:flex;gap:12px;flex-wrap:wrap;margin-top:11px;color:#6c7783;font-size:12px}.pcx-checks label{display:flex;gap:6px;align-items:center}.pcx-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin-bottom:12px}.pcx-summary>div{border:1px solid #dbe2ea;background:#f7f9fb;border-radius:11px;padding:10px}.dark .pcx-summary>div{border-color:#303840;background:#20252a}.pcx-summary small{display:block;color:#7d8792;font-size:10px}.pcx-summary b{display:block;margin-top:5px;font-size:17px}.pcx-table-wrap{overflow:auto;max-width:100%;border:1px solid #dbe2ea;border-radius:11px}.dark .pcx-table-wrap{border-color:#303840}.pcx-table{width:100%;border-collapse:separate;border-spacing:0;font-size:11px;white-space:nowrap}.pcx-table th{position:sticky;top:0;background:#eef2f6;color:#56616d;text-align:right;padding:9px;border-bottom:1px solid #d3dae2;z-index:1}.dark .pcx-table th{background:#23292f;color:#c8d0d8;border-color:#3a424b}.pcx-table th:first-child,.pcx-table td:first-child{text-align:left;position:sticky;left:0;background:inherit}.pcx-table td{padding:8px 9px;border-bottom:1px solid #e7ebef;text-align:right;background:#fff}.dark .pcx-table td{background:#191d21;border-color:#2b3239}.pcx-table tr:hover td{background:#f4f8fc}.dark .pcx-table tr:hover td{background:#222931}.pcx-table td:first-child{font-weight:700;z-index:1}.pcx-empty{text-align:center!important;color:#8b95a0;padding:24px!important}.pcx-tabs{display:flex;gap:5px;flex-wrap:wrap}.pcx-tab{border:1px solid #cfd7df;background:#f7f9fb;border-radius:8px;padding:7px 10px;font-size:11px;font-weight:800;color:#606b77}.dark .pcx-tab{background:#20252a;border-color:#39414a;color:#cbd2d9}.pcx-tab.active{background:#245f9f;color:#fff;border-color:#3477bb}.pcx-section-config{display:none}.pcx-section-config.open{display:block}.pcx-section-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:8px}.pcx-section-grid label{display:flex;align-items:center;gap:7px;border:1px solid #dbe2ea;background:#f7f9fb;padding:9px;border-radius:9px;font-size:11px}.dark .pcx-section-grid label{border-color:#303840;background:#20252a}.pcx-hidden{display:none!important}.pcx-note{font-size:11px;color:#7d8792;margin-top:10px}.pcx-breadcrumb{font-size:11px;color:#73808d}.pcx-raw-count{font-size:11px;color:#77828e}.pcx-metric-multi{display:flex;gap:8px;flex-wrap:wrap}.pcx-chip{background:#eaf2fb;color:#255f99;border-radius:999px;padding:4px 8px;font-size:10px;font-weight:800}.dark .pcx-chip{background:#25384b;color:#9fc9ef}
@media(max-width:1100px){.pcx-kpis{grid-template-columns:repeat(3,1fr)}.pcx-filter-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:700px){.pcx-kpis,.pcx-summary,.pcx-filter-grid,.pcx-section-grid{grid-template-columns:1fr}.pcx-command{align-items:flex-start}.pcx-panel-head{align-items:flex-start;flex-direction:column}}

/* V110 complete combinations and calculation audit */
.pcx-kpi-config,.pcx-section-config{display:none}.pcx-kpi-config.open,.pcx-section-config.open{display:block}.pcx-kpi-manager-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(310px,1fr));gap:8px}.pcx-kpi-manager-row{display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center;padding:10px 12px;border:1px solid var(--pcx-border,#d8dee8);border-radius:9px}.pcx-kpi-manager-row label{font-size:12px;white-space:nowrap}.pcx-muted{font-size:11px;opacity:.6}.pcx-search-wide{grid-column:span 2}.pcx-checks span{font-size:11px;opacity:.65;margin-left:16px}.pc-positive{color:#16845b!important}.pc-negative{color:#c04444!important}@media(max-width:900px){.pcx-search-wide{grid-column:span 1}.pcx-kpi-manager-row{grid-template-columns:1fr}.pcx-command-actions{flex-wrap:wrap}}

/* ===== v111 Project Control compact collapsible verification layout ===== */
.pcx-v111{gap:10px}.pcx-v111 .pcx-command{display:none!important}.pcx-top-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:2px 0}.pcx-v111 .pcx-readonly{color:#66717d}.dark .pcx-v111 .pcx-readonly{color:#a7b0ba}.pcx-kpis-top{grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:7px}.pcx-v111 .pcx-kpi{padding:9px 10px;border-radius:10px;min-height:72px}.pcx-v111 .pcx-kpi strong{font-size:17px;margin-top:3px}.pcx-v111 .pcx-kpi span{margin-top:2px}.pcx-tone-p0{background:#dcfce7!important;border-color:#86efac!important}.pcx-tone-p0:before{background:#22c55e!important}.pcx-tone-p1{background:#fef9c3!important;border-color:#fde047!important}.pcx-tone-p1:before{background:#eab308!important}.pcx-tone-good{background:#ecfdf5!important;border-color:#a7f3d0!important}.pcx-tone-good:before{background:#10b981!important}.pcx-tone-warn{background:#fefce8!important;border-color:#fde68a!important}.pcx-tone-warn:before{background:#eab308!important}.pcx-tone-alert{background:#fff7ed!important;border-color:#fdba74!important}.pcx-tone-alert:before{background:#f97316!important}.pcx-tone-bad{background:#fef2f2!important;border-color:#fca5a5!important}.pcx-tone-bad:before{background:#ef4444!important}.pcx-tone-neutral{background:#f8fafc!important}.dark .pcx-tone-p0,.dark .pcx-tone-p1,.dark .pcx-tone-good,.dark .pcx-tone-warn,.dark .pcx-tone-alert,.dark .pcx-tone-bad,.dark .pcx-tone-neutral{color:#111827!important}.pcx-financial-top{grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:6px;margin:0}.pcx-financial-top>div{padding:7px 9px;border-radius:8px}.pcx-financial-top b{font-size:14px;margin-top:2px}.pcx-collapse{border-radius:10px}.pcx-collapse-head{width:100%;border:0;background:transparent;color:inherit;padding:10px 12px;display:flex;justify-content:space-between;align-items:center;text-align:left;cursor:pointer}.pcx-collapse-head span:first-child b{display:block}.pcx-collapse-head small{display:block;color:#7c8793;margin-top:1px}.pcx-collapse-summary{display:flex;align-items:center;gap:10px;font-size:11px;color:#66717d}.pcx-collapse-summary i{font-style:normal;font-size:16px;transition:transform .15s}.pcx-collapse-body{border-top:1px solid #e2e7ed;padding:10px 11px}.dark .pcx-collapse-body{border-color:#30373f}.pcx-collapse.is-collapsed .pcx-collapse-body{display:none}.pcx-collapse.is-collapsed .pcx-collapse-summary i{transform:rotate(-90deg)}.pcx-v111 .pcx-filter-grid{grid-template-columns:repeat(6,minmax(115px,1fr));gap:6px}.pcx-v111 .pcx-field select,.pcx-v111 .pcx-field input{padding:6px 7px;border-radius:7px}.pcx-v111 .pcx-summary{gap:5px;margin:8px 0}.pcx-v111 .pcx-summary>div{padding:6px 8px;border-radius:7px}.pcx-v111 .pcx-summary b{font-size:14px;margin-top:2px}.pcx-v111 .pcx-table{font-size:10px}.pcx-v111 .pcx-table th,.pcx-v111 .pcx-table td{padding:5px 6px;max-width:190px;overflow:hidden;text-overflow:ellipsis}.pcx-v111 .pcx-table th{height:27px}.pcx-v111 .pcx-table td{height:25px}.pcx-manager-title{margin:5px 0 8px;font-size:12px}.pcx-manager-title:not(:first-child){margin-top:16px;padding-top:12px;border-top:1px solid #e2e7ed}.dark .pcx-manager-title:not(:first-child){border-color:#30373f}.pcx-v111 .pcx-kpi-manager-row{padding:7px 9px;grid-template-columns:1fr auto auto}.pcx-v111 .pcx-panel-body{padding:10px 11px}@media(max-width:1050px){.pcx-v111 .pcx-filter-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:650px){.pcx-v111 .pcx-filter-grid,.pcx-kpis-top,.pcx-financial-top{grid-template-columns:1fr}.pcx-v111 .pcx-kpi-manager-row{grid-template-columns:1fr}.pcx-collapse-summary{max-width:40%}}


/* ===== v113 — Unified SiteLog Settings cards ===== */
.sitelog-settings-unified-grid{
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  align-items:stretch;
  gap:14px;
}
.sitelog-settings-unified-grid .settings-list-card{
  border:1px solid #8F237A;
  border-radius:10px;
  padding:12px;
  min-height:220px;
  height:100%;
  display:flex;
  flex-direction:column;
  box-sizing:border-box;
  background:#fff;
}
.dark .sitelog-settings-unified-grid .settings-list-card{
  border-color:#8F237A;
  background:#111827;
}
.sitelog-settings-unified-grid .settings-list-card h3{
  min-height:18px;
  margin:0 0 10px;
  color:#8F237A;
}
.sitelog-settings-unified-grid .settings-chip-list{
  flex:1 1 auto;
  align-content:flex-start;
  overflow:auto;
  max-height:112px;
  min-height:54px;
  padding:2px 0;
}
.sitelog-settings-unified-grid .settings-list-add{
  margin-top:auto;
  width:100%;
}
.sitelog-settings-unified-grid .settings-list-add .tt0-input{
  min-width:0;
  height:34px;
}
.sitelog-settings-unified-grid .settings-list-add .tt0-btn-sm{
  width:34px;
  min-width:34px;
  height:34px;
}
.sitelog-settings-unified-grid .settings-card-select,
.sitelog-settings-unified-grid .settings-list-card>input.tt0-input{
  width:100%;
  height:34px;
  margin:4px 0 8px;
  box-sizing:border-box;
}
.sitelog-settings-unified-grid .settings-card-derived{
  margin-top:6px;
  font-size:.75rem;
  color:#4b5563;
}
.sitelog-settings-unified-grid .settings-card-derived span{font-weight:800;color:#8F237A}
.sitelog-settings-unified-grid .settings-card-help{
  margin-top:auto;
  padding-top:8px;
  font-size:.68rem;
  line-height:1.35;
  color:#9ca3af;
}
.sitelog-settings-unified-grid .empty-row-setting-card label{
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size:.75rem;
}
@media (max-width:700px){
  .sitelog-settings-unified-grid{grid-template-columns:1fr}
  .sitelog-settings-unified-grid .settings-list-card{min-height:190px}
}

/* v114 — Project Control resource split, responsive-width tables and clear collapse arrows */
.pcx-collapse-arrow{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border:1px solid #cbd5df;border-radius:5px;background:#f7f9fb;color:#52606d;font-size:10px;line-height:1;transition:transform .18s ease,background .18s ease}
.dark .pcx-collapse-arrow{background:#22282e;border-color:#3a434c;color:#d4dbe2}
.pcx-collapse-head:hover .pcx-collapse-arrow{background:#eaf2fb}
.dark .pcx-collapse-head:hover .pcx-collapse-arrow{background:#2b3742}
.pcx-collapse.is-collapsed .pcx-collapse-arrow{transform:rotate(-90deg)}
.pcx-dynamic-wrap{width:100%;overflow-x:auto}
.pcx-dynamic-table{width:max-content;min-width:100%}
.pcx-dynamic-table.pcx-table-few{width:100%;table-layout:fixed}
.pcx-dynamic-table.pcx-table-few th:first-child,.pcx-dynamic-table.pcx-table-few td:first-child{width:28%}
.pcx-dynamic-table.pcx-table-many{min-width:max(100%,calc(var(--pcx-col-count,6) * 118px));table-layout:auto}
.pcx-dynamic-table.pcx-table-many th,.pcx-dynamic-table.pcx-table-many td{min-width:108px;max-width:none}
.pcx-dynamic-table.pcx-table-many th:first-child,.pcx-dynamic-table.pcx-table-many td:first-child{min-width:160px}

/* ============================================================
   v116 — Project Control compact adaptive pivot + column totals
   ============================================================ */
#slview-projectcontrol .pcx-dynamic-wrap{
  width:100%;
  overflow-x:auto;
  overflow-y:hidden;
}
#slview-projectcontrol .pcx-dynamic-table,
#slview-projectcontrol .pcx-dynamic-table.pcx-table-few,
#slview-projectcontrol .pcx-dynamic-table.pcx-table-many{
  width:max-content!important;
  min-width:0!important;
  table-layout:auto!important;
}
#slview-projectcontrol .pcx-dynamic-table th,
#slview-projectcontrol .pcx-dynamic-table td,
#slview-projectcontrol .pcx-dynamic-table.pcx-table-many th,
#slview-projectcontrol .pcx-dynamic-table.pcx-table-many td{
  width:auto!important;
  min-width:96px!important;
  max-width:180px!important;
  padding:6px 10px!important;
}
#slview-projectcontrol .pcx-dynamic-table th:first-child,
#slview-projectcontrol .pcx-dynamic-table td:first-child,
#slview-projectcontrol .pcx-dynamic-table.pcx-table-few th:first-child,
#slview-projectcontrol .pcx-dynamic-table.pcx-table-few td:first-child,
#slview-projectcontrol .pcx-dynamic-table.pcx-table-many th:first-child,
#slview-projectcontrol .pcx-dynamic-table.pcx-table-many td:first-child{
  width:auto!important;
  min-width:145px!important;
  max-width:230px!important;
}
#slview-projectcontrol .pcx-dynamic-table th:not(:first-child),
#slview-projectcontrol .pcx-dynamic-table td:not(:first-child){
  text-align:right;
}
#slview-projectcontrol .pcx-dynamic-table tfoot td{
  position:sticky;
  bottom:0;
  z-index:2;
  background:#e8edf3!important;
  border-top:2px solid #aeb9c5;
  border-bottom:0;
  font-weight:900;
}
#slview-projectcontrol .pcx-dynamic-table tfoot td:first-child{
  z-index:3;
}
.dark #slview-projectcontrol .pcx-dynamic-table tfoot td{
  background:#2a3138!important;
  border-top-color:#56616d;
}

/* V117 — Project Control last view + named configurations */
.pcx-saved-views{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding:10px 12px;margin:0 0 10px;border:1px solid #d9e0e8;border-radius:8px;background:#fff;flex-wrap:wrap}
.pcx-saved-entry{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap}
.pcx-saved-entry .pcx-field{min-width:220px;margin:0}
.pcx-saved-entry small{min-width:190px;color:#667085;padding-bottom:7px}
.pcx-saved-entry small.is-error{color:#b42318;font-weight:700}
.pcx-saved-list{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.pcx-saved-item{display:inline-flex;align-items:stretch;border:1px solid #cdd6e0;border-radius:6px;overflow:hidden;background:#f8fafc}
.pcx-saved-load,.pcx-saved-delete{border:0;background:transparent;cursor:pointer;font:inherit}
.pcx-saved-load{padding:7px 10px;font-weight:700;color:#344054;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pcx-saved-load:hover{background:#eef4ff}
.pcx-saved-delete{padding:5px 8px;border-left:1px solid #cdd6e0;color:#b42318;font-size:16px;line-height:1}
.pcx-saved-delete:hover{background:#fff1f0}

/* ============================================================
   v118 — elegant collapsible headers, active-filter visibility,
   centered adaptive pivot, and strict Turnkey/WBS separation
   ============================================================ */
#slview-projectcontrol .pcx-collapse-head{
  background:linear-gradient(135deg,#263746 0%,#31495d 100%);
  color:#fff;
  padding:11px 14px;
  transition:filter .18s ease,transform .18s ease;
}
#slview-projectcontrol .pcx-collapse-head:hover{filter:brightness(1.08)}
#slview-projectcontrol .pcx-collapse-head small,
#slview-projectcontrol .pcx-collapse-summary{color:#d8e2eb}
#slview-projectcontrol .pcx-collapse-arrow{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.32);color:#fff}
#slview-projectcontrol .pcx-collapse-body{border-top:0}
#slview-projectcontrol .pcx-field-active{color:#34526b}
#slview-projectcontrol .pcx-field-active select,
#slview-projectcontrol .pcx-field-active input{
  background:#e8f1f8!important;
  border-color:#5f89a8!important;
  box-shadow:0 0 0 2px rgba(95,137,168,.13);
  color:#18364d!important;
  font-weight:800!important;
}
#slview-projectcontrol .pcx-field-active:after{
  content:'ACTIVE';
  justify-self:start;
  margin-top:-2px;
  padding:1px 5px;
  border-radius:999px;
  background:#345f7d;
  color:#fff;
  font-size:8px;
  letter-spacing:.08em;
}
.dark #slview-projectcontrol .pcx-field-active{color:#b9d2e4}
.dark #slview-projectcontrol .pcx-field-active select,
.dark #slview-projectcontrol .pcx-field-active input{background:#253b4b!important;border-color:#6e9bbb!important;color:#f3f8fb!important}
#slview-projectcontrol .pcx-dynamic-wrap{display:block;text-align:center}
#slview-projectcontrol .pcx-dynamic-table,
#slview-projectcontrol .pcx-dynamic-table.pcx-table-few,
#slview-projectcontrol .pcx-dynamic-table.pcx-table-many{margin-left:auto!important;margin-right:auto!important;text-align:initial}
#slview-projectcontrol .pcx-dynamic-table thead th{background:#dce6ee;color:#2e475b;font-weight:900}
.dark #slview-projectcontrol .pcx-dynamic-table thead th{background:#2b3c49;color:#edf4f8}

/* ============================================================
   v119.1 — Smart sortable Windows-style result table headers
   ============================================================ */
.pcx-dynamic-table thead th.pcx-sortable{
  position:sticky;
  top:0;
  z-index:3;
  padding:0;
  background:linear-gradient(180deg,#f8fafc 0%,#e8edf3 100%);
  border-right:1px solid #c7d0da;
  border-bottom:1px solid #aeb9c5;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
  color:#263442;
  white-space:nowrap;
  user-select:none;
}
.pcx-dynamic-table thead th.pcx-sortable:first-child{border-left:1px solid #c7d0da;}
.pcx-dynamic-table thead th.pcx-sortable button{
  width:100%;min-height:38px;padding:8px 10px;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  border:0;background:transparent;color:inherit;font:inherit;font-weight:700;
  cursor:pointer;text-align:left;
}
.pcx-dynamic-table thead th.pcx-sortable:not(:first-child) button{text-align:right;}
.pcx-dynamic-table thead th.pcx-sortable button:hover{
  background:linear-gradient(180deg,#ffffff 0%,#dce8f5 100%);
}
.pcx-dynamic-table thead th.pcx-sortable button:focus-visible{
  outline:2px solid #2563eb;outline-offset:-2px;
}
.pcx-dynamic-table thead th.pcx-sortable i{
  min-width:14px;font-style:normal;font-size:10px;line-height:1;color:#718096;text-align:center;
}
.pcx-dynamic-table thead th.pcx-sortable.is-sorted{
  background:linear-gradient(180deg,#eaf3ff 0%,#cfdef2 100%);
  color:#173b68;
  box-shadow:inset 0 -2px 0 #3b82f6,inset 0 1px 0 #fff;
}
.pcx-dynamic-table thead th.pcx-sortable.is-sorted i{color:#2563eb;}
.pcx-dynamic-table tbody tr:hover td{background:#f3f7fb;}

/* ============================================================
   v120 — Multi Metric Comparison
   ============================================================ */
#slview-projectcontrol .pcx-metric-picker{display:flex;flex-wrap:wrap;gap:12px;align-items:stretch;margin-bottom:14px;padding:12px;border:1px solid #ccd7e1;border-radius:12px;background:#f7f9fb}
#slview-projectcontrol .pcx-metric-picker-title{min-width:180px;display:flex;flex-direction:column;justify-content:center}.pcx-metric-picker-title b{font-size:14px}.pcx-metric-picker-title span{font-size:11px;color:#667788}
#slview-projectcontrol .pcx-metric-picker fieldset{display:flex;flex-wrap:wrap;gap:7px;min-width:210px;padding:8px 10px;border:1px solid #d7e0e8;border-radius:9px;background:#fff}
#slview-projectcontrol .pcx-metric-picker legend{padding:0 5px;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.08em;color:#526779}
#slview-projectcontrol .pcx-metric-picker label{display:flex;align-items:center;gap:6px;padding:6px 8px;border:1px solid #d7e0e8;border-radius:7px;background:#f8fafc;font-size:11px;font-weight:700;cursor:pointer;transition:.15s ease}
#slview-projectcontrol .pcx-metric-picker label:hover{border-color:#7f9bb0;background:#eef5fa}
#slview-projectcontrol .pcx-metric-picker label.is-active{border-color:#356b8b;background:#dfeef7;color:#183f58;box-shadow:inset 0 0 0 1px rgba(53,107,139,.12)}
#slview-projectcontrol .pcx-metric-tables-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,440px),1fr));gap:16px;align-items:start;margin-top:14px}
#slview-projectcontrol .pcx-metric-card{min-width:0;border:1px solid #cbd6df;border-radius:12px;background:#fff;overflow:hidden;box-shadow:0 5px 16px rgba(31,49,64,.08)}
#slview-projectcontrol .pcx-metric-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:12px 14px;background:linear-gradient(135deg,#263746,#345267);color:#fff}
#slview-projectcontrol .pcx-metric-card-head h3{margin:0;font-size:14px;line-height:1.25}.pcx-metric-card-head p{margin:4px 0 0;font-size:10px;color:#d9e5ed}.pcx-metric-card-head>span{white-space:nowrap;font-size:14px;font-weight:900}
#slview-projectcontrol .pcx-metric-card .pcx-table-wrap{max-width:100%;overflow:auto;text-align:left}
#slview-projectcontrol .pcx-metric-card .pcx-dynamic-table{width:max-content;min-width:100%;margin:0!important}
#slview-projectcontrol .pcx-metric-card .pcx-dynamic-table th,#slview-projectcontrol .pcx-metric-card .pcx-dynamic-table td{font-size:10px;padding:6px 8px}
#slview-projectcontrol .pcx-drill-metric{margin-bottom:18px}.pcx-drill-metric h3{position:sticky;top:0;margin:0;padding:10px 12px;background:#304b60;color:#fff;z-index:2}
.dark #slview-projectcontrol .pcx-metric-picker{background:#17242e;border-color:#394d5c}.dark #slview-projectcontrol .pcx-metric-picker fieldset,.dark #slview-projectcontrol .pcx-metric-card{background:#1e2d38;border-color:#405361}.dark #slview-projectcontrol .pcx-metric-picker label{background:#263844;border-color:#465b69;color:#e8f0f5}.dark #slview-projectcontrol .pcx-metric-picker label.is-active{background:#31526a;border-color:#78a4c2;color:#fff}
@media(max-width:520px){#slview-projectcontrol .pcx-metric-tables-grid{grid-template-columns:1fr}#slview-projectcontrol .pcx-metric-picker fieldset{min-width:100%}}

/* v121 — Per-table H control and drill-down context */
.pcx-metric-card-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}
.pcx-metric-card-actions>strong{font-size:1rem;white-space:nowrap}
.pcx-include-h{display:inline-flex;align-items:center;gap:7px;padding:6px 10px;border:1px solid #cbd5e1;border-radius:999px;background:#fff;color:#475569;font-size:12px;font-weight:700;cursor:pointer;user-select:none;transition:.18s ease}
.pcx-include-h:hover{border-color:#64748b;background:#f8fafc}
.pcx-include-h.is-active{border-color:#111827;background:#111827;color:#fff;box-shadow:0 4px 12px rgba(15,23,42,.16)}
.pcx-include-h input{margin:0;accent-color:#16a34a}
.pcx-drill-metric-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.pcx-drill-metric-head h3{margin:0}
.pcx-drill-h-state{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:800;letter-spacing:.02em}
.pcx-drill-h-state.is-included{background:#dcfce7;color:#166534}
.pcx-drill-h-state.is-excluded{background:#f1f5f9;color:#475569}
@media (max-width:640px){.pcx-metric-card-actions{width:100%;justify-content:space-between}.pcx-metric-card-head{align-items:flex-start;flex-wrap:wrap}}

/* ============================================================
   v121.1 — Unified Smart Windows headers + zebra data rows
   All Project Control title/header bars use one visual language.
   Multiple data rows alternate white / light gray for readability.
   ============================================================ */
#slview-projectcontrol .pcx-panel-head,
#slview-projectcontrol .pcx-collapse-head,
#slview-projectcontrol .pcx-metric-card-head,
#slview-projectcontrol .pcx-drill-metric > h3,
#slview-projectcontrol .pcx-drill-metric-head,
#slview-projectcontrol .pcx-manager-title{
  background:linear-gradient(180deg,#f8fafc 0%,#e7ecf2 100%)!important;
  color:#263442!important;
  border-top:1px solid #fff!important;
  border-bottom:1px solid #aeb9c5!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9)!important;
}
#slview-projectcontrol .pcx-panel-head,
#slview-projectcontrol .pcx-collapse-head,
#slview-projectcontrol .pcx-metric-card-head,
#slview-projectcontrol .pcx-drill-metric-head{
  min-height:42px;
  padding:9px 12px!important;
}
#slview-projectcontrol .pcx-panel-head b,
#slview-projectcontrol .pcx-collapse-head b,
#slview-projectcontrol .pcx-metric-card-head h3,
#slview-projectcontrol .pcx-drill-metric h3,
#slview-projectcontrol .pcx-manager-title{
  color:#263442!important;
  font-weight:800!important;
}
#slview-projectcontrol .pcx-panel-head small,
#slview-projectcontrol .pcx-collapse-head small,
#slview-projectcontrol .pcx-collapse-summary,
#slview-projectcontrol .pcx-metric-card-head p{
  color:#667788!important;
}
#slview-projectcontrol .pcx-collapse-arrow{
  background:#f8fafc!important;
  border-color:#b8c3ce!important;
  color:#445566!important;
}
#slview-projectcontrol .pcx-metric-card-actions>strong{
  color:#263442!important;
}

/* Smart Windows treatment for every Project Control table title row. */
#slview-projectcontrol .pcx-table thead th,
#slview-projectcontrol .pcv2-table thead th,
#slview-projectcontrol .pcx-raw-table thead th{
  background:linear-gradient(180deg,#f8fafc 0%,#e8edf3 100%)!important;
  color:#263442!important;
  border-right:1px solid #c7d0da!important;
  border-bottom:1px solid #aeb9c5!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9)!important;
  font-weight:800!important;
}

/* Zebra rows: white / light gray across every Project Control data table. */
#slview-projectcontrol .pcx-table tbody tr:nth-child(odd) td,
#slview-projectcontrol .pcv2-table tbody tr:nth-child(odd) td,
#slview-projectcontrol .pcx-raw-table tbody tr:nth-child(odd) td{
  background:#ffffff!important;
}
#slview-projectcontrol .pcx-table tbody tr:nth-child(even) td,
#slview-projectcontrol .pcv2-table tbody tr:nth-child(even) td,
#slview-projectcontrol .pcx-raw-table tbody tr:nth-child(even) td{
  background:#f2f4f7!important;
}
#slview-projectcontrol .pcx-table tbody tr:hover td,
#slview-projectcontrol .pcv2-table tbody tr:hover td,
#slview-projectcontrol .pcx-raw-table tbody tr:hover td{
  background:#e5f0fb!important;
}
#slview-projectcontrol .pcx-table tbody tr.is-selected td,
#slview-projectcontrol .pcv2-table tbody tr.is-selected td,
#slview-projectcontrol .pcx-raw-table tbody tr.is-selected td{
  background:#2f6fad!important;
  color:#fff!important;
}
#slview-projectcontrol .pcx-total-row td,
#slview-projectcontrol .pcx-table tfoot td{
  background:#3f4b57!important;
  color:#fff!important;
  border-top:2px solid #263442!important;
  font-weight:900!important;
}

.dark #slview-projectcontrol .pcx-panel-head,
.dark #slview-projectcontrol .pcx-collapse-head,
.dark #slview-projectcontrol .pcx-metric-card-head,
.dark #slview-projectcontrol .pcx-drill-metric > h3,
.dark #slview-projectcontrol .pcx-drill-metric-head,
.dark #slview-projectcontrol .pcx-manager-title,
.dark #slview-projectcontrol .pcx-table thead th,
.dark #slview-projectcontrol .pcv2-table thead th,
.dark #slview-projectcontrol .pcx-raw-table thead th{
  background:linear-gradient(180deg,#35404a 0%,#252d35 100%)!important;
  color:#f1f5f9!important;
  border-color:#55616d!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08)!important;
}
.dark #slview-projectcontrol .pcx-panel-head b,
.dark #slview-projectcontrol .pcx-collapse-head b,
.dark #slview-projectcontrol .pcx-metric-card-head h3,
.dark #slview-projectcontrol .pcx-drill-metric h3,
.dark #slview-projectcontrol .pcx-manager-title,
.dark #slview-projectcontrol .pcx-metric-card-actions>strong{color:#f1f5f9!important}
.dark #slview-projectcontrol .pcx-panel-head small,
.dark #slview-projectcontrol .pcx-collapse-head small,
.dark #slview-projectcontrol .pcx-collapse-summary,
.dark #slview-projectcontrol .pcx-metric-card-head p{color:#c7d2dc!important}
.dark #slview-projectcontrol .pcx-table tbody tr:nth-child(odd) td,
.dark #slview-projectcontrol .pcv2-table tbody tr:nth-child(odd) td,
.dark #slview-projectcontrol .pcx-raw-table tbody tr:nth-child(odd) td{background:#171c21!important}
.dark #slview-projectcontrol .pcx-table tbody tr:nth-child(even) td,
.dark #slview-projectcontrol .pcv2-table tbody tr:nth-child(even) td,
.dark #slview-projectcontrol .pcx-raw-table tbody tr:nth-child(even) td{background:#20262c!important}
.dark #slview-projectcontrol .pcx-table tbody tr:hover td,
.dark #slview-projectcontrol .pcv2-table tbody tr:hover td,
.dark #slview-projectcontrol .pcx-raw-table tbody tr:hover td{background:#2d4355!important}
.dark #slview-projectcontrol .pcx-total-row td,
.dark #slview-projectcontrol .pcx-table tfoot td{background:#0f1419!important;color:#fff!important;border-top-color:#6b7783!important}

/* ============================================================
   v121.2 — Dynamic table title width + full-height drill-down
   Metric card headers follow the real table width. The drill-down
   expands with its complete content and delegates scrolling to the page.
   ============================================================ */
#slview-projectcontrol .pcx-metric-tables-grid{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:flex-start!important;
  justify-content:flex-start!important;
  gap:16px!important;
}
#slview-projectcontrol .pcx-metric-card{
  display:inline-flex!important;
  flex:0 0 auto!important;
  flex-direction:column!important;
  width:max-content!important;
  max-width:100%!important;
  min-width:0!important;
}
#slview-projectcontrol .pcx-metric-card-head{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:100%!important;
}
#slview-projectcontrol .pcx-metric-card .pcx-table-wrap{
  width:max-content!important;
  max-width:100%!important;
}
#slview-projectcontrol .pcx-metric-card .pcx-dynamic-table{
  width:max-content!important;
  min-width:100%!important;
}

/* Centered, content-height detail page: no vertical inner scrolling. */
.pcv2-drawer-backdrop{
  position:absolute!important;
  left:0!important;
  right:0!important;
  bottom:auto!important;
  min-height:100vh!important;
  height:auto!important;
  padding:28px 24px!important;
  box-sizing:border-box!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:center!important;
  overflow:visible!important;
}
.pcv2-drawer{
  width:max-content!important;
  min-width:min(900px,calc(100vw - 48px))!important;
  max-width:calc(100vw - 48px)!important;
  height:auto!important;
  max-height:none!important;
  flex:0 0 auto!important;
  overflow:visible!important;
  border:1px solid var(--border,#dfe5eb)!important;
  border-radius:14px!important;
  box-shadow:0 22px 65px rgba(0,0,0,.25)!important;
  animation:pcv2ModalRise .2s ease!important;
}
.pcv2-drawer-content{
  flex:0 0 auto!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
}
.pcv2-drawer .pcx-drill-metric,
.pcv2-drawer .pcx-table-wrap,
.pcv2-drawer .pcx-raw-table{
  max-height:none!important;
  overflow:visible!important;
}
.pcv2-drawer .pcx-table-wrap{
  width:max-content!important;
  max-width:100%!important;
}
.pcv2-drawer .pcx-raw-table{
  width:max-content!important;
  min-width:100%!important;
}
@keyframes pcv2ModalRise{from{transform:translateY(14px);opacity:.55}to{transform:none;opacity:1}}
@media(max-width:960px){
  .pcv2-drawer-backdrop{padding:16px 12px!important}
  .pcv2-drawer{min-width:calc(100vw - 24px)!important;max-width:calc(100vw - 24px)!important}
}

/* ================= v122 — Presence Planning visual analytics ================= */
.presence-row-color-toggles .presence-color-mode-label{
  width:auto!important;min-width:142px!important;max-width:none!important;
  padding:0 5px!important;gap:5px!important;
}
.presence-color-mode-select{
  width:100px!important;min-width:100px!important;height:20px!important;
  padding:0 20px 0 5px!important;border:1px solid #64748b!important;
  border-radius:3px!important;background:#fff!important;color:#111827!important;
  font-size:.58rem!important;font-weight:700!important;line-height:18px!important;
}
/* Dynamic Color Mode is limited to the resource/activity information area:
   Resource / Activity, Skill, Total Presence and the optional Details/KPI columns.
   The date-planning grid is never filled by Color Mode, including empty dates. */
#presenceTable.presence-color-mode-active .presence-resource-row>td:not(.presence-row-number):not(.presence-row-controls):not(:has([data-pres-cell])):not(:has([data-pres-act-cell])),
#presenceTable.presence-color-mode-active .presence-resource-row>td:not(.presence-row-number):not(.presence-row-controls) .presence-resource-name{
  background:var(--presence-mode-color,#fff)!important;
  background-color:var(--presence-mode-color,#fff)!important;
}
#presenceTable.presence-color-mode-active .presence-resource-row .presence-color-select{opacity:.45}

/* Past dates receive a subtle covering tint in the date header only. */
#presenceTable thead th.pres-date-head.presence-date-past,
#presenceTable thead th.pres-day-head.presence-date-past{
  position:relative!important;
  box-shadow:inset 0 0 0 9999px rgba(15,23,42,.18)!important;
  filter:saturate(.82);
}

/* Primary time-navigation action. */
#presTodayWeek{
  min-width:132px!important;width:132px!important;height:28px!important;
  padding:0 18px!important;background:#facc15!important;color:#111827!important;
  border:1px solid #111827!important;border-radius:5px!important;
  font-weight:800!important;letter-spacing:.15px!important;
  box-shadow:none!important;
}
#presTodayWeek:hover{background:#fbbf24!important}
#presTodayWeek:active{background:#eab308!important;transform:translateY(1px)}

/* v123 pending updates */
.pcx-kpi-formula{display:block;margin-top:3px;font-size:.72em;font-weight:700;opacity:.75}


/* ================= v126 — keyboard entry + Presence KPI headers ================= */
/* KPI labels remain stacked; no Presence cell dimensions are overridden. */
#presenceTable thead th.pres-total-col > span{
  display:block!important;
  line-height:1.05!important;
}

/* v128 - conservative Presence refinements */
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index]>td,#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-divider-cell{height:12px!important;min-height:12px!important;max-height:12px!important;line-height:12px!important;padding-top:0!important;padding-bottom:0!important}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-divider-content,#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-divider-edit,#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-divider-copy{height:11px!important;min-height:11px!important;max-height:11px!important;line-height:11px!important}


/* v130 — Presence day grid compact square cells; no unrelated layout changes. */
#presenceTable .pres-day-head,
#presenceTable tbody td:has(> .presence-cell){
  width:20px!important;
  min-width:20px!important;
  max-width:20px!important;
  padding-left:0!important;
  padding-right:0!important;
}
#presenceTable .presence-cell{
  width:20px!important;
  min-width:20px!important;
  max-width:20px!important;
  height:20px!important;
  min-height:20px!important;
  max-height:20px!important;
  padding:0!important;
  line-height:20px!important;
  box-sizing:border-box!important;
}

/* v132 — Presence: Empty Row remains fixed during horizontal scrolling.
   Only the calendar/content moves beneath it; vertical behavior is unchanged. */
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] > td.presence-empty-divider-cell{
  position:sticky!important;
  left:var(--presence-empty-row-left,113px)!important;
  z-index:68!important;
  background:var(--empty-row-color,#ffffff)!important;
  background-color:var(--empty-row-color,#ffffff)!important;
}
#presenceTable.presence-hide-leading-columns tbody tr.presence-empty-divider-row[data-pres-order-index] > td.presence-empty-divider-cell{
  left:0!important;
}

/* v134 — Row/Code Color never fills the date-planning grid.
   Applies to Manual and every automatic Color Mode. Operational calendar
   indications (X/O/R/T/H, weekends, holidays, current day, project range and
   active activity dates) remain unchanged. */
#presenceTable tbody tr.presence-resource-row > td:has(> .presence-cell):not(.presence-saturday):not(.presence-sunday):not(.presence-holiday-us):not(.presence-holiday-mx):not(.presence-day-current):not(.presence-outside-before):not(.presence-outside-after),
#presenceTable tbody tr.presence-activity-row > td:has(> .presence-cell):not(.presence-saturday):not(.presence-sunday):not(.presence-holiday-us):not(.presence-holiday-mx):not(.presence-day-current):not(.presence-outside-before):not(.presence-outside-after):not(.activity-active-day):not(.presence-tracker-marker):not(.presence-tracker-delay){
  background:#fff!important;
  background-color:#fff!important;
  background-image:none!important;
}


/* ============================================================
   v135 — Presence toolbar cleanup
   - This Week centered exactly below Presence Planning
   - Input Mode removed
   - Show Row Colors checkbox removed
   - Reset Colors removed
   ============================================================ */
#slview-presence .presence-toolbar{
  position:relative!important;
  min-height:32px!important;
}
#slview-presence .presence-week-center{
  display:flex!important;
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  transform:translate(-50%,-50%)!important;
  width:auto!important;
  height:28px!important;
  margin:0!important;
  z-index:8!important;
  align-items:center!important;
  justify-content:center!important;
}
#slview-presence #presTodayWeek{
  background:#facc15!important;
  color:#111827!important;
  border:1px solid #111827!important;
  border-radius:4px!important;
  min-width:94px!important;
  height:28px!important;
  padding:0 14px!important;
  font-weight:800!important;
  box-shadow:none!important;
}
#slview-presence .presence-row-color-toggles{
  /* Remaining control is Color Mode only. Keep its established anchor. */
  width:auto!important;
}


/* Empty Row visual content is counter-translated by JS during horizontal scroll. */
#presenceTable .presence-empty-divider-content{will-change:transform!important}

/* v138 — Empty Row slightly taller; text vertically centered. */
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] > td,
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-divider-cell{
  height:16px!important;
  min-height:16px!important;
  max-height:16px!important;
  line-height:16px!important;
  padding-top:0!important;
  padding-bottom:0!important;
  vertical-align:middle!important;
}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-divider-content,
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-divider-edit,
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-divider-copy{
  height:15px!important;
  min-height:15px!important;
  max-height:15px!important;
  line-height:15px!important;
  align-items:center!important;
  vertical-align:middle!important;
}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-divider-edit .presence-activity-name{
  height:15px!important;
  min-height:15px!important;
  max-height:15px!important;
  line-height:15px!important;
  padding-top:0!important;
  padding-bottom:0!important;
  vertical-align:middle!important;
}
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-controls-wrap,
#presenceTable tbody tr.presence-empty-divider-row[data-pres-order-index] .presence-empty-actions-row{
  height:15px!important;
  min-height:15px!important;
  max-height:15px!important;
  align-items:center!important;
}

/* v139 — Project Control only: report dialog and compact RAW table */
#projectControlContainer .pcx-raw-clean th,
#projectControlContainer .pcx-raw-clean td{white-space:nowrap}
#projectControlContainer .pcx-raw-clean .pcx-repeat-empty{background:#fafbfc;color:transparent}
.pcx-report-modal{position:fixed;inset:0;z-index:100000;background:rgba(15,23,42,.55);display:flex;align-items:center;justify-content:center;padding:24px}
.pcx-report-dialog{width:min(720px,96vw);max-height:90vh;overflow:auto;background:#fff;border-radius:12px;box-shadow:0 24px 70px rgba(0,0,0,.28);color:#17202a}
.pcx-report-dialog>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 22px 16px;border-bottom:1px solid #dfe5ea}
.pcx-report-dialog>header small{font-weight:800;letter-spacing:.1em;color:#697581}.pcx-report-dialog>header h2{margin:3px 0;font-size:22px}.pcx-report-dialog>header p{margin:0;color:#66727e}
.pcx-report-dialog>header button{border:0;background:transparent;font-size:28px;line-height:1;cursor:pointer;color:#65717d}
.pcx-report-tabs{display:flex;gap:6px;padding:14px 22px 0}.pcx-report-tabs button{border:1px solid #cfd7df;background:#f5f7f9;border-radius:7px 7px 0 0;padding:9px 14px;font-weight:700;cursor:pointer}.pcx-report-tabs button.is-active{background:#111;color:#fff;border-color:#111}
.pcx-report-pane{display:none;padding:20px 22px 22px}.pcx-report-pane.is-active{display:block}.pcx-report-default-card{border:1px solid #d8e0e7;border-radius:9px;padding:16px;background:#fafbfc;display:grid;gap:6px}.pcx-report-default-card>b{font-size:16px}.pcx-report-default-card>span{color:#64707c}.pcx-report-default-card ul{margin:5px 0 0;padding-left:18px;color:#49545f}
.pcx-report-options{display:grid;grid-template-columns:1.4fr 1fr;gap:14px}.pcx-report-options fieldset{border:1px solid #d8e0e7;border-radius:9px;padding:13px;display:grid;gap:9px}.pcx-report-options legend{font-weight:800;padding:0 5px}.pcx-report-options label{display:flex;align-items:center;gap:8px}.pcx-report-options select{margin-left:auto;min-width:130px;padding:6px;border:1px solid #cbd4dc;border-radius:6px;background:#fff}.pcx-report-generate{margin-top:16px;min-width:210px}
@media(max-width:640px){.pcx-report-options{grid-template-columns:1fr}.pcx-report-modal{padding:10px}}

/* v139 fix — Project Control report preview (scoped to Project Control reporting only) */
.pcx-report-preview-modal{position:fixed;inset:0;z-index:100100;background:rgba(15,23,42,.68);display:flex;align-items:stretch;justify-content:center;padding:18px}
.pcx-report-preview-shell{width:min(1480px,100%);height:100%;min-height:0;background:#eef2f5;border-radius:12px;box-shadow:0 26px 80px rgba(0,0,0,.34);display:flex;flex-direction:column;overflow:hidden;color:#17202a}
.pcx-report-preview-shell>header{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:13px 16px;background:#fff;border-bottom:1px solid #d8e0e7}
.pcx-report-preview-shell>header small{font-weight:800;letter-spacing:.1em;color:#697581}.pcx-report-preview-shell>header h2{margin:2px 0;font-size:19px}.pcx-report-preview-shell>header p{margin:0;color:#66727e;font-size:12px}
.pcx-report-preview-actions{display:flex;align-items:center;gap:8px}.pcx-preview-close{border:0;background:transparent;color:#65717d;font-size:28px;line-height:1;cursor:pointer;padding:3px 6px}
.pcx-report-preview-stage{flex:1 1 auto;min-height:0;padding:14px;overflow:hidden}.pcx-report-preview-stage iframe{display:block;width:100%;height:100%;border:1px solid #cbd4dc;border-radius:6px;background:#fff;box-shadow:0 4px 18px rgba(15,23,42,.12)}
@media(max-width:720px){.pcx-report-preview-modal{padding:6px}.pcx-report-preview-shell>header{align-items:flex-start;flex-direction:column}.pcx-report-preview-actions{width:100%;flex-wrap:wrap}.pcx-report-preview-stage{padding:6px}}

/* v139 Project Control only — grouped financial columns */
#projectControlContainer .pcx-raw-clean thead .pcx-fin-group-row th{
  text-align:center;
  font-weight:800;
  letter-spacing:.02em;
  border-bottom:2px solid #aeb7c1;
}
#projectControlContainer .pcx-raw-clean .pcx-fin-actual{background:#eaf4fb;}
#projectControlContainer .pcx-raw-clean .pcx-fin-remaining{background:#fff5d9;}
#projectControlContainer .pcx-raw-clean .pcx-fin-caf{background:#e9f7ec;}
#projectControlContainer .pcx-raw-clean .pcx-fin-identity,
#projectControlContainer .pcx-raw-clean .pcx-fin-detail{background:#f5f7f9;}
#projectControlContainer .pcx-raw-clean tbody td.pcx-fin-actual{background:#f5faff;}
#projectControlContainer .pcx-raw-clean tbody td.pcx-fin-remaining{background:#fffaf0;}
#projectControlContainer .pcx-raw-clean tbody td.pcx-fin-caf{background:#f3fbf5;}
#projectControlContainer .pcx-raw-clean tbody td.pcx-repeat-empty{color:transparent;}

/* v139 Project Control only — grouped financial columns */
#projectControlContainer .pcx-raw-clean thead .pcx-fin-group-row th{ text-align:center; font-weight:800; letter-spacing:.02em; border-bottom:2px solid #aeb7c1; }
#projectControlContainer .pcx-raw-clean .pcx-fin-actual{background:#eaf4fb;}
#projectControlContainer .pcx-raw-clean .pcx-fin-remaining{background:#fff5d9;}
#projectControlContainer .pcx-raw-clean .pcx-fin-caf{background:#e9f7ec;}
#projectControlContainer .pcx-raw-clean .pcx-fin-identity,
#projectControlContainer .pcx-raw-clean .pcx-fin-detail{background:#f5f7f9;}
#projectControlContainer .pcx-raw-clean tbody td.pcx-fin-actual{background:#f5faff;}
#projectControlContainer .pcx-raw-clean tbody td.pcx-fin-remaining{background:#fffaf0;}
#projectControlContainer .pcx-raw-clean tbody td.pcx-fin-caf{background:#f3fbf5;}

/* v140 — Project Control 360° only */
#projectControlContainer .pcv140-nav-shell{display:grid;grid-template-columns:170px minmax(0,1fr);gap:14px;align-items:start}
#projectControlContainer .pcv140-sidebar{position:sticky;top:10px;border:1px solid #d8dee4;border-radius:8px;background:#fff;padding:10px;display:flex;flex-direction:column;gap:5px;z-index:4}
#projectControlContainer .pcv140-sidebar>b{font-size:10px;letter-spacing:.08em;color:#68737d;padding:3px 5px 8px}
#projectControlContainer .pcv140-sidebar button{border:0;background:transparent;text-align:left;padding:8px 9px;border-radius:6px;font-size:12px;font-weight:600;color:#37424d;cursor:pointer}
#projectControlContainer .pcv140-sidebar button:hover{background:#f2f5f7}
#projectControlContainer .pcv140-sidebar button.is-active{background:#111;color:#fff}
#projectControlContainer .pcv140-content{min-width:0}
#projectControlContainer .pcv140-executive{grid-template-columns:repeat(5,minmax(0,1fr))!important}
#projectControlContainer .pcv140-health{display:flex;flex-direction:column;gap:4px;border:1px solid #d2d9df;border-radius:8px;padding:12px;background:#fff}
#projectControlContainer .pcv140-health small{font-size:10px;color:#69747e}.pcv140-health strong{font-size:18px}.pcv140-health span{font-size:10px;color:#69747e}
#projectControlContainer .pcv140-health-bar{height:5px;border-radius:99px;background:#e7ebee;overflow:hidden;margin-top:4px}#projectControlContainer .pcv140-health-bar i{display:block;height:100%;background:currentColor}
#projectControlContainer .pcv140-health-good{color:#237a3b;background:#eff9f1}.pcv140-health-watch{color:#877000;background:#fff9df}.pcv140-health-risk{color:#a75200;background:#fff2df}.pcv140-health-critical{color:#a52727;background:#fdeeee}
#projectControlContainer .pcv140-category-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:10px 0 14px}
#projectControlContainer .pcv140-category{border:1px solid #d5dce2;border-radius:8px;padding:13px;display:flex;flex-direction:column;gap:4px;min-height:86px}
#projectControlContainer .pcv140-category small{font-size:10px;font-weight:800;letter-spacing:.07em}.pcv140-category strong{font-size:21px}.pcv140-category span{font-size:10px;color:#66717b}
#projectControlContainer .pcv140-actual{background:#eef7fd;border-color:#c8e2f2}.pcv140-remaining{background:#fff8e6;border-color:#ecdca9}.pcv140-caf{background:#eef9f0;border-color:#c9e5ce}
.pcv140-standard-later{margin-top:16px;padding:12px;border:1px dashed #cbd2d8;border-radius:7px;display:flex;flex-direction:column;gap:4px;color:#737d86;background:#f8f9fa}
@media(max-width:1050px){#projectControlContainer .pcv140-nav-shell{grid-template-columns:1fr}#projectControlContainer .pcv140-sidebar{position:static;flex-direction:row;overflow-x:auto}#projectControlContainer .pcv140-sidebar>b{display:none}#projectControlContainer .pcv140-sidebar button{white-space:nowrap}#projectControlContainer .pcv140-executive{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* ===== V141 PROJECT CONTROL — LOCKED OUTER SHELL / INTERNAL SCROLL ONLY ===== */
body.pcv141-project-control-active{overflow:hidden!important}
#slview-projectcontrol.pcv141-scroll-lock{overflow:hidden!important;margin:0!important}
#slview-projectcontrol.pcv141-scroll-lock>.project-control-shell{
  display:flex;
  flex-direction:column;
  min-height:0;
  overflow:hidden;
}
#slview-projectcontrol.pcv141-scroll-lock .project-control-heading{
  flex:0 0 auto;
  position:relative;
  z-index:12;
  background:inherit;
}
#slview-projectcontrol.pcv141-scroll-lock #projectControlContainer{
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
}
#slview-projectcontrol.pcv141-scroll-lock #projectControlContainer>.pcv140-nav-shell{
  height:100%;
  min-height:0;
  align-items:stretch;
  overflow:hidden;
}
#slview-projectcontrol.pcv141-scroll-lock #projectControlContainer .pcv140-sidebar{
  position:relative;
  top:auto;
  align-self:stretch;
  height:100%;
  min-height:0;
  overflow-y:auto;
}
#slview-projectcontrol.pcv141-scroll-lock #projectControlContainer .pcv140-content{
  height:100%;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  padding-right:3px;
}
@media(max-width:1050px){
  #slview-projectcontrol.pcv141-scroll-lock #projectControlContainer>.pcv140-nav-shell{grid-template-rows:auto minmax(0,1fr)}
  #slview-projectcontrol.pcv141-scroll-lock #projectControlContainer .pcv140-sidebar{height:auto;overflow-x:auto;overflow-y:hidden}
}
@media print{
  body.pcv141-project-control-active{overflow:visible!important}
  #slview-projectcontrol.pcv141-scroll-lock,
  #slview-projectcontrol.pcv141-scroll-lock>.project-control-shell,
  #slview-projectcontrol.pcv141-scroll-lock #projectControlContainer,
  #slview-projectcontrol.pcv141-scroll-lock #projectControlContainer>.pcv140-nav-shell,
  #slview-projectcontrol.pcv141-scroll-lock #projectControlContainer .pcv140-content{height:auto!important;max-height:none!important;overflow:visible!important}
}

/* ===== V142 PROJECT CONTROL — 9 FINANCIAL CELLS / OPAQUE TIMELINE / FIXED SIDEBAR SETTINGS ===== */
#projectControlContainer .pcv142-financial-strip{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  margin:8px 0 12px;
}
#projectControlContainer .pcv142-financial-group{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:4px;
  border:1px solid #d5dce2;
  border-radius:8px;
  padding:4px;
}
#projectControlContainer .pcv142-financial-cell{
  min-width:0;
  min-height:58px;
  padding:8px 9px;
  border:1px solid rgba(107,122,136,.18);
  border-radius:6px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:3px;
}
#projectControlContainer .pcv142-financial-cell small{
  font-size:9px;
  color:#66717b;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#projectControlContainer .pcv142-financial-cell strong{font-size:16px;line-height:1.15}
#projectControlContainer .pcv142-financial-group.pcv140-caf{background:#eef9f0;border-color:#c9e5ce;color:#176b2b}
#projectControlContainer .pcv142-financial-group.pcv140-actual{background:#eef7fd;border-color:#c8e2f2;color:#1459a5}
#projectControlContainer .pcv142-financial-group.pcv140-remaining{background:#fff8e6;border-color:#ecdca9;color:#a86600}
#slview-projectcontrol.pcv141-scroll-lock .pcv140-sidebar{overflow-y:auto}
#slview-projectcontrol.pcv141-scroll-lock .pcv142-sidebar-settings{
  margin-top:auto;
  padding-top:9px;
  border-top:1px solid #e1e6eb;
  display:flex;
  flex-direction:column;
  gap:7px;
  flex:0 0 auto;
}
#projectControlContainer .pcv142-settings-title{font-size:9px;letter-spacing:.08em;color:#68737d;padding:0 5px}
#projectControlContainer .pcv142-sidebar-settings .pcx-command-actions{display:grid;grid-template-columns:1fr;gap:5px;width:100%}
#projectControlContainer .pcv142-sidebar-settings .pcx-btn{width:100%;justify-content:center}
#projectControlContainer .pcv142-sidebar-settings .pcx-saved-views{
  margin:0;padding:7px;border:1px solid #d8dee4;border-radius:7px;background:#f8fafb;display:flex;flex-direction:column;align-items:stretch;gap:5px
}
#projectControlContainer .pcv142-sidebar-settings .pcx-saved-views>*{max-width:100%;width:100%}
#projectControlContainer .pcv142-sidebar-settings .pcx-saved-views input,
#projectControlContainer .pcv142-sidebar-settings .pcx-saved-views select{min-width:0;width:100%}
body.pcv141-project-control-active .sl-timeline-bar{
  background:#f3f4f6!important;
  border-top:1px solid #e2e7eb!important;
  border-bottom:1px solid #d7dde3!important;
  box-shadow:0 3px 8px rgba(15,23,42,.08);
  isolation:isolate;
}
body.pcv141-project-control-active .sl-timeline-bar::before{
  content:'';position:absolute;inset:0;background:#f3f4f6;z-index:-1;pointer-events:none
}
.dark body.pcv141-project-control-active .sl-timeline-bar,
html.dark body.pcv141-project-control-active .sl-timeline-bar{background:#18181b!important;border-color:#30343a!important}
.dark body.pcv141-project-control-active .sl-timeline-bar::before,
html.dark body.pcv141-project-control-active .sl-timeline-bar::before{background:#18181b}
@media(max-width:1050px){
  #projectControlContainer .pcv142-financial-strip{grid-template-columns:1fr}
  #slview-projectcontrol.pcv141-scroll-lock .pcv142-sidebar-settings{margin-top:8px;min-width:210px}
}
@media print{
  #projectControlContainer .pcv142-financial-strip{grid-template-columns:repeat(3,1fr)!important}
  #projectControlContainer .pcv142-sidebar-settings{display:none!important}
}

/* ===== V143 PROJECT CONTROL — COMPACT FIXED SIDEBAR / OPAQUE TIMELINE ===== */
/* Scope strictly limited to Project Control. */
#slview-projectcontrol.pcv141-scroll-lock #projectControlContainer .pcv140-sidebar{
  overflow:hidden!important;
  min-width:0;
}
#slview-projectcontrol.pcv141-scroll-lock #projectControlContainer .pcv142-sidebar-settings{
  min-width:0;
  width:100%;
  margin-top:auto;
  padding-top:7px;
  gap:5px;
}
#projectControlContainer .pcv142-sidebar-settings .pcx-saved-views{
  min-width:0;
  width:100%;
  padding:6px;
  gap:5px;
  overflow:hidden;
  box-sizing:border-box;
}
#projectControlContainer .pcv142-sidebar-settings .pcx-saved-entry{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:5px!important;
  width:100%!important;
  min-width:0!important;
  align-items:stretch!important;
}
#projectControlContainer .pcv142-sidebar-settings .pcx-field,
#projectControlContainer .pcv142-sidebar-settings .pcx-field input,
#projectControlContainer .pcv142-sidebar-settings #pcxViewName{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
#projectControlContainer .pcv142-sidebar-settings .pcx-field span{
  display:block;
  white-space:normal;
  line-height:1.2;
}
#projectControlContainer .pcv142-sidebar-settings #pcxViewMessage{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  line-height:1.25!important;
  font-size:9px!important;
  color:#6b7680!important;
  box-sizing:border-box!important;
}
#projectControlContainer .pcv142-sidebar-settings .pcx-command-actions,
#projectControlContainer .pcv142-sidebar-settings .pcx-saved-entry{
  width:100%;
  min-width:0;
}
#projectControlContainer .pcv142-sidebar-settings .pcx-btn,
#projectControlContainer .pcv142-sidebar-settings .pcx-saved-load,
#projectControlContainer .pcv142-sidebar-settings .pcx-saved-delete{
  border:1px solid #d6dde4!important;
  background:linear-gradient(180deg,#ffffff 0%,#f5f7f9 100%)!important;
  color:#34414d!important;
  box-shadow:0 1px 2px rgba(15,23,42,.06),inset 0 1px 0 rgba(255,255,255,.9)!important;
  transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .08s ease!important;
}
#projectControlContainer .pcv142-sidebar-settings .pcx-btn:hover,
#projectControlContainer .pcv142-sidebar-settings .pcx-saved-load:hover,
#projectControlContainer .pcv142-sidebar-settings .pcx-saved-delete:hover{
  background:linear-gradient(180deg,#ffffff 0%,#edf2f6 100%)!important;
  border-color:#b9c5cf!important;
  box-shadow:0 3px 8px rgba(15,23,42,.10),inset 0 1px 0 #fff!important;
}
#projectControlContainer .pcv142-sidebar-settings .pcx-btn:active,
#projectControlContainer .pcv142-sidebar-settings .pcx-saved-load:active,
#projectControlContainer .pcv142-sidebar-settings .pcx-saved-delete:active{
  transform:translateY(1px);
  box-shadow:0 1px 2px rgba(15,23,42,.08)!important;
}
#projectControlContainer .pcv142-sidebar-settings .pcx-btn.primary{
  background:linear-gradient(180deg,#f4f8fc 0%,#e8f0f7 100%)!important;
  border-color:#b9cad9!important;
  color:#244c70!important;
}
#projectControlContainer .pcv142-sidebar-settings .pcx-saved-list{
  min-width:0;
  width:100%;
  max-height:92px;
  overflow:hidden;
}
#projectControlContainer .pcv142-sidebar-settings .pcx-saved-item{
  min-width:0;
  width:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr) 26px;
  gap:4px;
}
#projectControlContainer .pcv142-sidebar-settings .pcx-saved-load{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* The global Project Timeline must be a fully opaque cover above internal scrolling content. */
body.pcv141-project-control-active .sl-timeline-bar{
  position:sticky!important;
  z-index:1000!important;
  background:#f3f4f6!important;
  background-clip:border-box!important;
  isolation:isolate!important;
  overflow:hidden!important;
  box-shadow:0 5px 10px rgba(15,23,42,.12)!important;
}
body.pcv141-project-control-active .sl-timeline-bar::before{
  content:''!important;
  position:absolute!important;
  inset:-2px!important;
  z-index:0!important;
  background:#f3f4f6!important;
  opacity:1!important;
  pointer-events:none!important;
}
body.pcv141-project-control-active .sl-timeline-bar>*{
  position:relative;
  z-index:1;
}
html.dark body.pcv141-project-control-active .sl-timeline-bar::before,
.dark body.pcv141-project-control-active .sl-timeline-bar::before{
  background:#18181b!important;
}

@media(max-height:760px){
  #projectControlContainer .pcv140-sidebar{padding:7px;gap:3px}
  #projectControlContainer .pcv140-sidebar>b{padding-bottom:4px}
  #projectControlContainer .pcv140-sidebar button{padding:6px 7px}
  #slview-projectcontrol.pcv141-scroll-lock #projectControlContainer .pcv142-sidebar-settings{padding-top:5px;gap:4px}
  #projectControlContainer .pcv142-sidebar-settings .pcx-saved-views{padding:5px;gap:4px}
  #projectControlContainer .pcv142-sidebar-settings .pcx-btn{min-height:25px!important;padding:4px 7px!important;font-size:10px!important}
  #projectControlContainer .pcv142-sidebar-settings .pcx-field span{font-size:9px}
  #projectControlContainer .pcv142-sidebar-settings input{height:26px!important;padding:4px 6px!important}
  #projectControlContainer .pcv142-sidebar-settings .pcx-saved-list{max-height:58px}
}

/* ===== V144 PROJECT CONTROL — TIMELINE AS HARD TABLE BOUNDARY ===== */
/* The global timeline is the physical upper limit of the complete Project Control module. */
body.pcv141-project-control-active #slTimelineBar{
  z-index:1200!important;
  margin-bottom:0!important;
  border-bottom:1px solid #cfd6dc!important;
  box-shadow:0 2px 5px rgba(15,23,42,.10)!important;
}
#slview-projectcontrol.pcv141-scroll-lock{
  position:relative;
  box-sizing:border-box!important;
}
#slview-projectcontrol.pcv141-scroll-lock>.project-control-shell{
  position:relative;
  z-index:1;
  margin-top:0!important;
}
/* Internal data can scroll only inside the area beginning below the fixed heading. */
#slview-projectcontrol.pcv141-scroll-lock #projectControlContainer .pcv140-content{
  position:relative;
  z-index:1;
  scroll-padding-top:0!important;
}
/* Prevent visual bleed at the exact boundary. */
body.pcv141-project-control-active #slTimelineBar::after{
  content:'';
  position:absolute;
  left:0;
  right:0;
  bottom:-2px;
  height:2px;
  background:#f3f4f6;
  pointer-events:none;
  z-index:3;
}
html.dark body.pcv141-project-control-active #slTimelineBar::after,
.dark body.pcv141-project-control-active #slTimelineBar::after{
  background:#18181b;
}
@media print{
  #slview-projectcontrol.pcv141-scroll-lock{padding-top:0!important}
}

/* ===== V145 PROJECT CONTROL — SCROLL CLIPPED BELOW ALL UPPER HEADERS ===== */
/* The Project Control data/table viewport begins below the upper headers and is hard-clipped there. */
body.pcv141-project-control-active #slview-projectcontrol.pcv141-scroll-lock{
  overflow:hidden!important;
  contain:layout paint;
  isolation:isolate;
}
#slview-projectcontrol.pcv141-scroll-lock>.project-control-shell{
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  overflow:hidden!important;
  min-height:0!important;
  clip-path:inset(0);
  background:#fff;
}
html.dark #slview-projectcontrol.pcv141-scroll-lock>.project-control-shell,
.dark #slview-projectcontrol.pcv141-scroll-lock>.project-control-shell{background:#111827}
#slview-projectcontrol.pcv141-scroll-lock .project-control-heading{
  grid-row:1;
  position:relative!important;
  top:auto!important;
  z-index:30!important;
  flex:none!important;
  background:#fff!important;
  margin-bottom:0!important;
  box-shadow:0 1px 0 #e2e8f0;
}
html.dark #slview-projectcontrol.pcv141-scroll-lock .project-control-heading,
.dark #slview-projectcontrol.pcv141-scroll-lock .project-control-heading{background:#111827!important;box-shadow:0 1px 0 #374151}
#slview-projectcontrol.pcv141-scroll-lock #projectControlContainer{
  grid-row:2;
  min-height:0!important;
  height:100%!important;
  overflow:hidden!important;
  position:relative;
  z-index:1;
  clip-path:inset(0);
}
#slview-projectcontrol.pcv141-scroll-lock #projectControlContainer>.pcv140-nav-shell{
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
  clip-path:inset(0);
}
#slview-projectcontrol.pcv141-scroll-lock #projectControlContainer .pcv140-sidebar{
  overflow:hidden!important;
  height:100%!important;
}
#slview-projectcontrol.pcv141-scroll-lock #projectControlContainer .pcv140-content{
  position:relative!important;
  inset:auto!important;
  height:100%!important;
  max-height:100%!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  clip-path:inset(0);
  contain:layout paint;
  isolation:isolate;
  scroll-padding-top:0!important;
}
/* Sticky table headers are constrained to the internal content viewport, never to the page headers. */
#slview-projectcontrol.pcv141-scroll-lock #projectControlContainer .pcv140-content .pcx-table thead,
#slview-projectcontrol.pcv141-scroll-lock #projectControlContainer .pcv140-content .pc-table thead{
  position:sticky;
  top:0;
  z-index:8;
}
#slview-projectcontrol.pcv141-scroll-lock #projectControlContainer .pcv140-content .pcx-table th,
#slview-projectcontrol.pcv141-scroll-lock #projectControlContainer .pcv140-content .pc-table th{
  background-clip:padding-box;
}
@media print{
  body.pcv141-project-control-active #slview-projectcontrol.pcv141-scroll-lock{contain:none!important}
  #slview-projectcontrol.pcv141-scroll-lock>.project-control-shell{display:block!important;clip-path:none!important}
}

/* ===== V146 PROJECT CONTROL — SHUTTER: HIDE GLOBAL BLACK KPI + TIMELINE ===== */
/* Only inside Project Control: close the two global strips and recover their vertical space. */
body.pcv141-project-control-active #slKpiHeader,
body.pcv141-project-control-active #slTimelineBar{
  display:none!important;
  height:0!important;
  min-height:0!important;
  max-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  box-shadow:none!important;
  overflow:hidden!important;
}
/* Project Control begins directly below the main SiteLog tab header. */
body.pcv141-project-control-active main{
  padding-top:0!important;
}
body.pcv141-project-control-active #slview-projectcontrol.pcv141-scroll-lock{
  margin-top:0!important;
  padding-top:0!important;
}
body.pcv141-project-control-active #slview-projectcontrol .project-control-heading{
  margin-top:0!important;
  border-top-left-radius:0!important;
  border-top-right-radius:0!important;
}
/* The title and fixed 360° column remain inside the viewport below the tab bar. */
body.pcv141-project-control-active #slview-projectcontrol.pcv141-scroll-lock>.project-control-shell{
  margin-top:0!important;
}

/* ===== V145 CORRECTION — SITELOG TABS ARE THE HARD UPPER BOUNDARY ===== */
/* While Project Control is active, the whole module is fixed immediately below
   the Overview / Project Control tab strip. The internal table viewport cannot
   paint, scroll or bleed underneath that navigation header. */
body.pcv141-project-control-active .sitelog-tabs-nav{
  z-index:1300!important;
  background:#f3f4f6!important;
  isolation:isolate!important;
  box-shadow:0 2px 6px rgba(15,23,42,.12)!important;
}
html.dark body.pcv141-project-control-active .sitelog-tabs-nav,
.dark body.pcv141-project-control-active .sitelog-tabs-nav{background:#111827!important}
body.pcv141-project-control-active #slview-projectcontrol.pcv141-scroll-lock{
  margin:0!important;
  padding:0!important;
  border-radius:0!important;
  contain:layout paint!important;
  clip-path:inset(0)!important;
  background:#f8fafc!important;
}
html.dark body.pcv141-project-control-active #slview-projectcontrol.pcv141-scroll-lock,
.dark body.pcv141-project-control-active #slview-projectcontrol.pcv141-scroll-lock{background:#030712!important}
body.pcv141-project-control-active #slview-projectcontrol.pcv141-scroll-lock>.project-control-shell{
  height:100%!important;
  max-height:100%!important;
  overflow:hidden!important;
  border-top-left-radius:0!important;
  border-top-right-radius:0!important;
}
body.pcv141-project-control-active #slview-projectcontrol.pcv141-scroll-lock #projectControlContainer,
body.pcv141-project-control-active #slview-projectcontrol.pcv141-scroll-lock #projectControlContainer>.pcv140-nav-shell,
body.pcv141-project-control-active #slview-projectcontrol.pcv141-scroll-lock #projectControlContainer .pcv140-content{
  min-height:0!important;
  max-height:100%!important;
  overflow-anchor:none;
}
@media(max-width:1050px){
  body.pcv141-project-control-active #slview-projectcontrol.pcv141-scroll-lock{
    width:calc(100vw - 16px)!important;
  }
}
@media print{
  body.pcv141-project-control-active #slview-projectcontrol.pcv141-scroll-lock{
    position:static!important;
    width:auto!important;
    transform:none!important;
    height:auto!important;
    max-height:none!important;
  }
}

/* ===== V145 FINAL ENFORCEMENT — PROJECT CONTROL BELOW SITELOG TAB BAR ===== */
body.pcv145-boundary-active #slKpiHeader,
body.pcv145-boundary-active #slTimelineBar{display:none!important}
body.pcv145-boundary-active #slview-projectcontrol{
  display:block!important;
  position:fixed!important;
  top:var(--pcv145-tabs-bottom,110px)!important;
  bottom:8px!important;
  left:50%!important;
  right:auto!important;
  width:min(calc(100vw - 32px),80rem)!important;
  height:auto!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  transform:translateX(-50%)!important;
  overflow:hidden!important;
  z-index:35!important;
  contain:layout paint!important;
  isolation:isolate!important;
}
body.pcv145-boundary-active #slview-projectcontrol>.project-control-shell{
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  overflow:hidden!important;
}
body.pcv145-boundary-active #slview-projectcontrol .project-control-heading{
  grid-row:1!important;
  position:relative!important;
  top:auto!important;
  z-index:5!important;
  flex:0 0 auto!important;
  background:#fff!important;
}
body.pcv145-boundary-active #slview-projectcontrol #projectControlContainer{
  grid-row:2!important;
  min-height:0!important;
  height:100%!important;
  overflow:hidden!important;
}
body.pcv145-boundary-active #slview-projectcontrol #projectControlContainer>.pcv140-nav-shell{
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
}
body.pcv145-boundary-active #slview-projectcontrol #projectControlContainer .pcv140-sidebar{
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
}
body.pcv145-boundary-active #slview-projectcontrol #projectControlContainer .pcv140-content{
  height:100%!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
}
html.dark body.pcv145-boundary-active #slview-projectcontrol .project-control-heading,
.dark body.pcv145-boundary-active #slview-projectcontrol .project-control-heading{background:#111827!important}
@media print{
  body.pcv145-boundary-active #slview-projectcontrol{position:static!important;transform:none!important;width:auto!important;height:auto!important;overflow:visible!important}
}


/* ===== V146 FINAL — unlocked timeline, Project Control Center below tabs, fixed 360 sidebar, Presence Quick Filters ===== */
body.pcv141-project-control-active{overflow:auto!important}
#slTimelineBar,
body.pcv141-project-control-active #slTimelineBar,
body.pcv145-boundary-active #slTimelineBar{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  max-height:none!important;
  height:auto!important;
  position:relative!important;
  top:auto!important;
  transform:none!important;
  overflow:visible!important;
}
#slTimelineBar::before,#slTimelineBar::after{display:none!important}
#slview-projectcontrol,
body.pcv145-boundary-active #slview-projectcontrol,
#slview-projectcontrol.pcv141-scroll-lock{
  position:relative!important;
  inset:auto!important;
  top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
  width:auto!important;height:auto!important;max-height:none!important;
  transform:none!important;overflow:visible!important;z-index:auto!important;
  margin:0!important;padding:0!important;
}
#slview-projectcontrol>.project-control-shell,
body.pcv145-boundary-active #slview-projectcontrol>.project-control-shell,
#slview-projectcontrol.pcv141-scroll-lock>.project-control-shell{
  display:block!important;height:auto!important;max-height:none!important;overflow:visible!important;
}
#slview-projectcontrol .project-control-heading{
  position:sticky!important;
  top:var(--pcv146-tabs-bottom,105px)!important;
  z-index:60!important;
  background:#fff!important;
  box-shadow:0 1px 0 #d8dee4,0 8px 16px rgba(15,23,42,.08)!important;
  margin:-18px -18px 14px!important;
  padding:16px 18px!important;
  border-radius:8px 8px 0 0!important;
}
html.dark #slview-projectcontrol .project-control-heading,.dark #slview-projectcontrol .project-control-heading{background:#111827!important}
#slview-projectcontrol #projectControlContainer,
#slview-projectcontrol #projectControlContainer>.pcv140-nav-shell,
#slview-projectcontrol #projectControlContainer .pcv140-content{
  height:auto!important;max-height:none!important;overflow:visible!important;min-height:0!important;
}
#slview-projectcontrol #projectControlContainer>.pcv140-nav-shell{align-items:start!important}
#slview-projectcontrol #projectControlContainer .pcv140-sidebar{
  position:sticky!important;
  top:calc(var(--pcv146-tabs-bottom,105px) + 94px)!important;
  max-height:calc(100vh - var(--pcv146-tabs-bottom,105px) - 110px)!important;
  overflow-y:auto!important;
  align-self:start!important;
}
.pcv146-presence-tools{border-top:1px solid #e2e7eb;margin-top:8px;padding-top:9px;display:flex;flex-direction:column;gap:7px}
.pcv146-presence-tools>b{font-size:9px;letter-spacing:.08em;color:#68737d;padding:0 5px}
.pcv146-quick-buttons{display:grid;gap:4px}
#projectControlContainer .pcv140-sidebar .pcv146-quick-buttons button,
#projectControlContainer .pcv140-sidebar .pcv146-apply{
  border:1px solid #dce3e9!important;background:linear-gradient(#fff,#f7f9fb)!important;color:#334155!important;
  box-shadow:0 1px 2px rgba(15,23,42,.05)!important;border-radius:7px!important;padding:7px 8px!important;font-size:10px!important;font-weight:700!important;
}
#projectControlContainer .pcv140-sidebar .pcv146-quick-buttons button:hover,
#projectControlContainer .pcv140-sidebar .pcv146-apply:hover{border-color:#aebdca!important;background:#fff!important;transform:translateY(-1px)}
#projectControlContainer .pcv140-sidebar .pcv146-quick-buttons button.is-active{background:#eef6ff!important;border-color:#98bee8!important;color:#174f8d!important}
.pcv146-custom-filters{display:grid;gap:6px;padding:7px;border:1px solid #e1e6eb;border-radius:7px;background:#f8fafb}
.pcv146-custom-filters label{font-size:9px;font-weight:700;color:#5f6b76;display:grid;gap:3px;min-width:0}
.pcv146-custom-filters select{width:100%;min-width:0;border:1px solid #cfd8e1;border-radius:6px;padding:6px;background:#fff;font-size:10px;color:#334155}
.pcv146-presence-summary{border:1px solid #d8e1e8;border-radius:9px;background:#fff;margin:0 0 12px;overflow:hidden}
.pcv146-presence-summary>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px;background:#f7fafc;border-bottom:1px solid #e1e7ec}
.pcv146-presence-summary small{font-size:9px;color:#68737d;letter-spacing:.08em}.pcv146-presence-summary h3{margin:2px 0 0;font-size:15px;color:#18212b}
.pcv146-summary-kpis{display:flex;gap:6px;flex-wrap:wrap}.pcv146-summary-kpis span{border:1px solid #d8e1e8;border-radius:999px;padding:5px 8px;font-size:10px;background:#fff}.pcv146-summary-kpis b{font-size:12px}
.pcv146-result-list{padding:9px;display:grid;gap:8px;max-height:300px;overflow:auto}
.pcv146-result-group{border:1px solid #e1e7ec;border-radius:7px;overflow:hidden}.pcv146-result-group-head{display:flex;justify-content:space-between;padding:7px 9px;background:#f8fafb;font-size:10px}.pcv146-result-group-head span{color:#68737d}
.pcv146-person-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:7px 9px;border-top:1px solid #edf1f4}.pcv146-person-row:first-of-type{border-top:0}.pcv146-person-row div{display:flex;flex-direction:column;min-width:0}.pcv146-person-row strong{font-size:11px;color:#24313d}.pcv146-person-row small{white-space:normal;overflow-wrap:anywhere}.pcv146-person-row>b{font-size:10px;color:#355f8a;white-space:nowrap}.pcv146-empty{padding:18px;text-align:center;color:#7a8590;font-size:11px}
@media(max-width:1050px){#slview-projectcontrol #projectControlContainer .pcv140-sidebar{position:relative!important;top:auto!important;max-height:none!important}.pcv146-presence-summary>header{align-items:flex-start;flex-direction:column}}
@media print{#slview-projectcontrol .project-control-heading,#slview-projectcontrol #projectControlContainer .pcv140-sidebar{position:static!important}.pcv146-presence-tools{display:none!important}}


/* ===== V147 — visible Presence filters + stable light native dropdown menus ===== */
/* Keep the 360 column fixed, while allowing its contents to remain reachable. */
#slview-projectcontrol #projectControlContainer .pcv140-sidebar{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  scrollbar-gutter:stable;
  overscroll-behavior:contain;
}

/* Presence tools are now directly below the 360 Navigation title. */
#projectControlContainer .pcv140-sidebar>.pcv146-presence-tools{
  order:0;
  margin:6px 0 9px!important;
  padding:8px!important;
  border:1px solid #dce4eb!important;
  border-radius:9px!important;
  background:#f8fafc!important;
  box-shadow:0 2px 8px rgba(15,23,42,.05)!important;
}
#projectControlContainer .pcv140-sidebar>.pcv146-presence-tools>b{
  display:block!important;
  padding:0 1px 5px!important;
  color:#44515e!important;
  font-size:9px!important;
}
#projectControlContainer .pcv146-quick-buttons{
  grid-template-columns:1fr!important;
}
#projectControlContainer .pcv146-custom-filters{
  margin-top:2px!important;
  padding:6px!important;
  background:#fff!important;
}
#projectControlContainer .pcv146-custom-filters select{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  height:30px!important;
  background:#fff!important;
  color:#1f2937!important;
  -webkit-text-fill-color:#1f2937!important;
}
#projectControlContainer .pcv146-custom-filters select option{
  background:#fff!important;
  color:#1f2937!important;
}

/* Make the six quick views unmistakably visible without making them heavy. */
#projectControlContainer .pcv146-quick-buttons button{
  display:block!important;
  width:100%!important;
  min-height:29px!important;
  text-align:left!important;
  white-space:normal!important;
  line-height:1.2!important;
}

/* ===== V151 — restore opaque header and remove dropdown compositor artifacts =====
   The black area was not caused by the option colors. The Project Control view
   still inherited contain:paint / isolation from the former fixed-boundary
   implementation. Chrome can briefly promote that isolated paint layer while a
   native select popup opens, exposing the dark compositor surface underneath. */
body.pcv141-project-control-active #sitelogPage,
body.pcv141-project-control-active #sitelogPage main,
body.pcv141-project-control-active #slview-projectcontrol,
body.pcv145-boundary-active #slview-projectcontrol,
#slview-projectcontrol.pcv141-scroll-lock{
  contain:none!important;
  isolation:auto!important;
  filter:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  opacity:1!important;
}

/* Explicitly repaint every layer above Project Control as opaque. */
body.pcv141-project-control-active #sitelogPage > header,
body.pcv141-project-control-active .sitelog-header,
body.pcv141-project-control-active .sl-tabs,
body.pcv141-project-control-active .sitelog-tabs,
body.pcv141-project-control-active #slview-projectcontrol .project-control-heading{
  background-color:#fff!important;
  background-image:none!important;
  opacity:1!important;
  filter:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  mix-blend-mode:normal!important;
}

/* Preserve the original dark-theme appearance without translucent layers. */
html.dark body.pcv141-project-control-active #sitelogPage > header,
html.dark body.pcv141-project-control-active .sitelog-header,
html.dark body.pcv141-project-control-active .sl-tabs,
html.dark body.pcv141-project-control-active .sitelog-tabs,
html.dark body.pcv141-project-control-active #slview-projectcontrol .project-control-heading,
.dark body.pcv141-project-control-active #sitelogPage > header,
.dark body.pcv141-project-control-active .sitelog-header,
.dark body.pcv141-project-control-active .sl-tabs,
.dark body.pcv141-project-control-active .sitelog-tabs,
.dark body.pcv141-project-control-active #slview-projectcontrol .project-control-heading{
  background-color:#111827!important;
  background-image:none!important;
  opacity:1!important;
}

/* Native selects: keep the control itself on a stable, fully opaque layer.
   Do not use transforms, filters or animations on focus/open. */
body.pcv141-project-control-active select,
body.pcv141-project-control-active select:focus,
body.pcv141-project-control-active select:active{
  opacity:1!important;
  filter:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  transform:none!important;
  animation:none!important;
  transition:none!important;
  background-color:#fff!important;
  color:#1f2937!important;
  -webkit-text-fill-color:#1f2937!important;
}
body.pcv141-project-control-active select option,
body.pcv141-project-control-active select optgroup{
  background-color:#fff!important;
  color:#1f2937!important;
}

/* ===== V152 — Project Control flush directly below Project Timeline =====
   Remove the main top padding that exposed scrolling content between the
   Project Timeline bar and the Project Control Center / Report header. */
body.pcv141-project-control-active #sitelogPage main{
  padding-top:0!important;
}
body.pcv141-project-control-active #slview-projectcontrol{
  margin-top:0!important;
}
body.pcv141-project-control-active #slview-projectcontrol>.project-control-shell{
  margin-top:0!important;
  border-top-left-radius:0!important;
  border-top-right-radius:0!important;
}
body.pcv141-project-control-active #slview-projectcontrol .project-control-heading{
  margin-top:-18px!important;
}

/* ===== V153 — real zero-gap Timeline → Project Control boundary =====
   The previous rule only changed the main padding. The remaining strip came
   from the Project Control card's own p-5 padding plus the sticky layer's
   rounding/shadow. Remove that internal offset and paint an opaque bridge
   above the sticky header so scrolling content can never show through. */
body.pcv141-project-control-active #sitelogPage main{
  padding-top:0!important;
}
body.pcv141-project-control-active #slview-projectcontrol{
  margin:0!important;
  padding:0!important;
}
body.pcv141-project-control-active #slview-projectcontrol>.project-control-shell{
  margin:0!important;
  padding-top:0!important;
  border-top:0!important;
  border-top-left-radius:0!important;
  border-top-right-radius:0!important;
  overflow:visible!important;
}
body.pcv141-project-control-active #slview-projectcontrol .project-control-heading{
  margin:0 -20px 14px!important;
  padding:16px 20px!important;
  border-radius:0!important;
  top:var(--pcv146-tabs-bottom,105px)!important;
  background:#fff!important;
  box-shadow:0 1px 0 #d8dee4,0 8px 16px rgba(15,23,42,.08)!important;
}
/* Opaque bridge covering any fractional/sticky offset between the tabs and
   Project Control Center while the document scrolls. */
body.pcv141-project-control-active #slview-projectcontrol .project-control-heading::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:100%;
  height:24px;
  background:#fff;
  pointer-events:none;
}
html.dark body.pcv141-project-control-active #slview-projectcontrol .project-control-heading,
.dark body.pcv141-project-control-active #slview-projectcontrol .project-control-heading,
html.dark body.pcv141-project-control-active #slview-projectcontrol .project-control-heading::before,
.dark body.pcv141-project-control-active #slview-projectcontrol .project-control-heading::before{
  background:#111827!important;
}

/* ===== V154 — structural Timeline → Project Control connection =====
   Project Control is now a direct sibling immediately after Project Timeline,
   rather than a card nested inside the padded <main>. This removes the actual
   layout gap instead of masking it with negative margins or pseudo-elements. */
body.pcv141-project-control-active #slTimelineBar{
  margin-bottom:0!important;
  border-bottom:0!important;
}
#slview-projectcontrol.project-control-direct{
  display:block;
  width:100%;
  margin:0!important;
  padding:0!important;
  background:#fff;
}
#slview-projectcontrol.project-control-direct{display:none}
#slview-projectcontrol.project-control-direct.active{display:block!important}
#slview-projectcontrol.project-control-direct>.project-control-shell{
  width:100%;
  margin:0 auto!important;
  padding:0 16px 24px!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  overflow:visible!important;
  background:#fff!important;
}
#slview-projectcontrol.project-control-direct .project-control-heading{
  position:sticky!important;
  top:var(--pcv146-tabs-bottom,105px)!important;
  z-index:72!important;
  margin:0 -16px 14px!important;
  padding:14px 16px!important;
  border-top:1px solid #d8dee4!important;
  border-bottom:1px solid #d8dee4!important;
  border-radius:0!important;
  background:#fff!important;
  box-shadow:none!important;
}
#slview-projectcontrol.project-control-direct .project-control-heading::before{
  display:none!important;
  content:none!important;
}
/* The report/table area begins immediately below the heading, with no card gap. */
#slview-projectcontrol.project-control-direct #projectControlContainer{
  margin:0!important;
  padding-top:0!important;
}
html.dark #slview-projectcontrol.project-control-direct,
.dark #slview-projectcontrol.project-control-direct,
html.dark #slview-projectcontrol.project-control-direct>.project-control-shell,
.dark #slview-projectcontrol.project-control-direct>.project-control-shell,
html.dark #slview-projectcontrol.project-control-direct .project-control-heading,
.dark #slview-projectcontrol.project-control-direct .project-control-heading{
  background:#111827!important;
}
@media(max-width:700px){
  #slview-projectcontrol.project-control-direct>.project-control-shell{padding-left:8px!important;padding-right:8px!important}
  #slview-projectcontrol.project-control-direct .project-control-heading{margin-left:-8px!important;margin-right:-8px!important;padding-left:10px!important;padding-right:10px!important}
}


/* ===== V156 — restore Project Control full-screen width =====
   V154 moved the module outside <main>, but the old Tailwind max-w-7xl/mx-auto
   wrapper remained on the Project Control shell and reduced the working area.
   Keep the zero-gap structural connection to Project Timeline while restoring
   the original edge-to-edge horizontal workspace. */
#slview-projectcontrol.project-control-direct{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
}
#slview-projectcontrol.project-control-direct>.project-control-shell{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0!important;
  padding:0 16px 24px!important;
}
#slview-projectcontrol.project-control-direct #projectControlContainer,
#slview-projectcontrol.project-control-direct #projectControlContainer>.pcv140-nav-shell,
#slview-projectcontrol.project-control-direct #projectControlContainer .pcv140-content{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
}
/* Keep the connected heading aligned with the full-width workspace. */
#slview-projectcontrol.project-control-direct .project-control-heading{
  width:auto!important;
  max-width:none!important;
  margin-left:-16px!important;
  margin-right:-16px!important;
}
@media(max-width:700px){
  #slview-projectcontrol.project-control-direct>.project-control-shell{
    padding-left:8px!important;
    padding-right:8px!important;
  }
  #slview-projectcontrol.project-control-direct .project-control-heading{
    margin-left:-8px!important;
    margin-right:-8px!important;
  }
}

/* ============================================================
   V158 — TIMELINE COLLAPSIBLE + PROJECT CONTROL DYNAMIC STICKY LINK
   Timeline keeps its original shutter behavior. Project Control Center stays
   in normal document flow below the Timeline and only docks directly beneath
   the Overview / Presence / Project Control tabs when scrolling reaches it.
   ============================================================ */
#slTimelineBar .sl-timeline-panel.hidden{
  display:none!important;
}
#slTimelineToggle{
  cursor:pointer!important;
  pointer-events:auto!important;
}
#slTimelineToggle .sl-timeline-arrow{
  display:inline-flex!important;
}

/* Native sticky behavior: no fixed positioning and no forced permanent dock. */
#slview-projectcontrol.project-control-direct .project-control-heading{
  position:-webkit-sticky!important;
  position:sticky!important;
  top:var(--pcv146-tabs-bottom,105px)!important;
  z-index:72!important;
  background:#fff!important;
  opacity:1!important;
  margin-top:0!important;
}

/* Seal only the fractional pixel at the docking boundary. This does not reserve
   space and does not make the header permanently fixed. */
#slview-projectcontrol.project-control-direct .project-control-heading::before{
  content:""!important;
  display:block!important;
  position:absolute!important;
  left:0!important;
  right:0!important;
  bottom:100%!important;
  height:2px!important;
  background:#fff!important;
  pointer-events:none!important;
}
html.dark #slview-projectcontrol.project-control-direct .project-control-heading,
.dark #slview-projectcontrol.project-control-direct .project-control-heading,
html.dark #slview-projectcontrol.project-control-direct .project-control-heading::before,
.dark #slview-projectcontrol.project-control-direct .project-control-heading::before{
  background:#111827!important;
}


/* ============================================================
   V159 — HIDE PROJECT TIMELINE ONLY IN PROJECT CONTROL
   Project Control is a dedicated analytical workspace. The shared Timeline
   is removed from this view only; all other SiteLog tabs retain the original
   Timeline, including its collapse/expand behavior and saved state.
   ============================================================ */
body.sl-project-control-no-timeline #slTimelineBar{
  display:none!important;
}

/* With the Timeline absent, Project Control starts immediately after the
   preceding shared SiteLog header area, without inherited Timeline spacing. */
body.sl-project-control-no-timeline #slview-projectcontrol.project-control-direct{
  margin-top:0!important;
  border-top:0!important;
}
body.sl-project-control-no-timeline #slview-projectcontrol.project-control-direct>.project-control-shell{
  margin-top:0!important;
  padding-top:0!important;
}
body.sl-project-control-no-timeline #slview-projectcontrol.project-control-direct .project-control-heading{
  margin-top:0!important;
  border-top:0!important;
}

/* Remove the old two-pixel Timeline docking bridge in this view: there is no
   Timeline boundary to seal anymore. The heading remains fully opaque. */
body.sl-project-control-no-timeline #slview-projectcontrol.project-control-direct .project-control-heading::before{
  display:none!important;
  content:none!important;
}

/* ===== V160 — Project Control actions and saved views inside black header ===== */
#slview-projectcontrol .project-control-heading.pcv160-heading-with-tools{
  display:grid!important;
  grid-template-columns:minmax(250px,.8fr) minmax(540px,1.7fr) auto!important;
  align-items:center!important;
  gap:14px!important;
  padding-top:10px!important;
  padding-bottom:10px!important;
}
#slview-projectcontrol .pcv160-header-tools{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
}
#slview-projectcontrol .pcv160-header-tools .pcx-command-actions{
  display:flex!important;
  flex:0 0 auto;
  align-items:center;
  gap:6px;
  margin:0!important;
}
#slview-projectcontrol .pcv160-header-tools .pcx-btn{
  min-height:32px;
  padding:6px 10px;
  white-space:nowrap;
}
#slview-projectcontrol .pcv160-header-tools .pcx-saved-views{
  display:flex!important;
  flex:1 1 auto;
  min-width:0;
  align-items:center;
  gap:7px;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
#slview-projectcontrol .pcv160-header-tools .pcx-saved-entry{
  display:flex!important;
  flex:1 1 auto;
  min-width:0;
  align-items:flex-end;
  gap:6px;
}
#slview-projectcontrol .pcv160-header-tools .pcx-field{
  flex:1 1 170px;
  min-width:120px;
  margin:0!important;
}
#slview-projectcontrol .pcv160-header-tools .pcx-field span,
#slview-projectcontrol .pcv160-header-tools #pcxViewMessage,
#slview-projectcontrol .pcv160-header-tools .pcx-saved-list{
  display:none!important;
}
#slview-projectcontrol .pcv160-header-tools .pcx-field input{
  width:100%;
  height:32px;
  border:1px solid rgba(255,255,255,.38)!important;
  background:#fff!important;
  color:#111!important;
  border-radius:5px!important;
  padding:5px 8px!important;
}
#slview-projectcontrol .pcv160-header-tools .pcx-btn:not(.primary){
  border-color:rgba(255,255,255,.5)!important;
  background:rgba(255,255,255,.12)!important;
  color:#fff!important;
}
#slview-projectcontrol .pcv160-header-tools .pcx-btn:not(.primary):hover{
  background:rgba(255,255,255,.22)!important;
}
#slview-projectcontrol .pcv160-header-tools .pcx-btn.primary{
  background:#fff!important;
  border-color:#fff!important;
  color:#111!important;
}
#projectControlContainer .pcv140-sidebar>.pcv142-sidebar-settings{display:none!important}
@media(max-width:1250px){
  #slview-projectcontrol .project-control-heading.pcv160-heading-with-tools{
    grid-template-columns:minmax(220px,.7fr) minmax(430px,1.3fr) auto!important;
  }
  #slview-projectcontrol .pcv160-header-tools #pcxSaveLastProfileView{display:none!important}
}
@media(max-width:980px){
  #slview-projectcontrol .project-control-heading.pcv160-heading-with-tools{
    grid-template-columns:1fr!important;
    align-items:stretch!important;
  }
  #slview-projectcontrol .pcv160-header-tools{justify-content:flex-start;flex-wrap:wrap}
  #slview-projectcontrol .project-control-heading-actions{justify-content:flex-start!important}
}

/* ============================================================
   V162 — Project Control black-header toolbar refinement
   ============================================================ */
#slview-projectcontrol .project-control-heading.pcv162-heading-with-tools{
  grid-template-columns:minmax(230px,.75fr) minmax(610px,1.75fr) auto!important;
}
#slview-projectcontrol .pcv162-header-tools{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  flex-wrap:nowrap!important;
}
#slview-projectcontrol .pcv162-status-line{
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
  margin-right:2px;
}
#slview-projectcontrol .pcv162-status-line .project-control-live{
  order:0;
  margin:0!important;
}
#slview-projectcontrol .pcv162-status-line .pcx-readonly{
  order:1;
  color:#c7cdd5!important;
}
#slview-projectcontrol .pcv162-header-tools .pcx-command-actions{
  flex-wrap:nowrap!important;
}
#slview-projectcontrol .pcv162-header-tools .pcx-btn{
  height:32px!important;
  min-height:32px!important;
  padding:0 11px!important;
  border-radius:6px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:11px!important;
  font-weight:800!important;
  line-height:1!important;
}
#slview-projectcontrol .pcv162-header-tools #pcxKpiBtn,
#slview-projectcontrol .pcv162-header-tools #pcxSaveNamedView{
  background:#fff!important;
  color:#111827!important;
  border-color:#fff!important;
}
#slview-projectcontrol .pcv162-header-tools .pcx-saved-views{
  flex:0 1 auto!important;
  width:auto!important;
}
#slview-projectcontrol .pcv162-header-tools .pcx-saved-entry{
  flex:0 1 auto!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
}
#slview-projectcontrol .pcv162-header-tools .pcx-field{
  flex:0 0 150px!important;
  min-width:150px!important;
  max-width:150px!important;
}
#slview-projectcontrol .pcv162-header-tools .pcx-field input{
  width:150px!important;
  min-width:150px!important;
  max-width:150px!important;
  height:32px!important;
  box-sizing:border-box!important;
}
#slview-projectcontrol .pcv162-header-tools #pcxSaveLastProfileView{
  max-width:118px;
}
@media(max-width:1280px){
  #slview-projectcontrol .project-control-heading.pcv162-heading-with-tools{
    grid-template-columns:minmax(210px,.65fr) minmax(500px,1.45fr) auto!important;
  }
  #slview-projectcontrol .pcv162-status-line .pcx-readonly{font-size:9px!important;letter-spacing:.04em!important}
  #slview-projectcontrol .pcv162-header-tools .pcx-field{flex-basis:130px!important;min-width:130px!important;max-width:130px!important}
  #slview-projectcontrol .pcv162-header-tools .pcx-field input{width:130px!important;min-width:130px!important;max-width:130px!important}
}

/* ===== V163 PROJECT CONTROL — TODAY OPERATIONAL VIEW ===== */
.pcv163-today-view{padding:0 0 24px;min-width:0}
.pcv163-today-head{padding:18px 20px;border:1px solid #d9e0e7;border-radius:8px;background:#fff;margin-bottom:12px}
.pcv163-today-head small{font-size:10px;font-weight:800;letter-spacing:.12em;color:#5f6b76}
.pcv163-today-head h2{margin:4px 0 2px;font-size:20px;color:#111827}
.pcv163-today-head p{margin:0;color:#66717d;font-size:12px}
.pcv163-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}
.pcv163-kpis article{border:1px solid #d9e0e7;border-radius:8px;background:#fff;padding:13px;min-width:0}
.pcv163-kpis small{display:block;font-size:10px;font-weight:800;letter-spacing:.05em;color:#64707c}
.pcv163-kpis strong{display:block;font-size:27px;line-height:1.1;margin:4px 0;color:#111827}
.pcv163-kpis span{display:block;font-size:11px;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pcv163-car-panel{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;border:1px solid #d9e0e7;border-radius:8px;background:#fff;margin-bottom:12px}
.pcv163-car-panel b,.pcv163-car-panel small{display:block}.pcv163-car-panel small{font-size:11px;color:#6b7280;margin-top:2px}
.pcv163-name-list{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.pcv163-name-chip{font-size:11px;font-weight:700;padding:5px 8px;border:1px solid #cfd7df;border-radius:999px;background:#f5f7f9}
.pcv163-empty-inline{font-size:11px;color:#6b7280}
.pcv163-table-wrap{overflow:auto;border:1px solid #d9e0e7;border-radius:8px;background:#fff}
.pcv163-table{width:100%;border-collapse:collapse;font-size:12px}
.pcv163-table th{padding:10px 12px;text-align:left;background:#f4f6f8;border-bottom:1px solid #d9e0e7;font-size:10px;letter-spacing:.04em;color:#4b5563;white-space:nowrap}
.pcv163-table td{padding:10px 12px;border-bottom:1px solid #edf0f2;white-space:nowrap}
.pcv163-table tbody tr:last-child td{border-bottom:0}
.pcv163-status{display:inline-flex;padding:4px 7px;border-radius:999px;font-size:10px;font-weight:800}
.pcv163-status.site{background:#e9f6ed;color:#1f6b3a}.pcv163-status.travel{background:#edf3fb;color:#315f9d}
.pcv163-empty{text-align:center!important;color:#6b7280;padding:28px!important}
@media(max-width:1100px){.pcv163-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.pcv163-car-panel{align-items:flex-start;flex-direction:column}.pcv163-name-list{justify-content:flex-start}}


/* ============================================================
   V164 — Complete Project Control header actions + KPI status
   ============================================================ */
#slKpiHeader{position:relative!important;overflow:visible!important}
#slKpiHeader .pcv164-kpi-status{
  position:absolute!important;
  right:max(16px,calc((100vw - 1280px)/2 + 12px))!important;
  top:4px!important;
  z-index:8!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  white-space:nowrap!important;
  pointer-events:none!important;
}
#slKpiHeader .pcv164-kpi-status .project-control-live,
#slKpiHeader .pcv164-kpi-status .pcx-readonly{
  display:inline-flex!important;
  align-items:center!important;
  gap:5px!important;
  font-size:9px!important;
  font-weight:900!important;
  letter-spacing:.055em!important;
  line-height:1!important;
  color:#d7dde5!important;
  background:rgba(0,0,0,.28)!important;
  border:1px solid rgba(255,255,255,.18)!important;
  border-radius:999px!important;
  padding:4px 7px!important;
  margin:0!important;
}
#slKpiHeader .pcv164-kpi-status .project-control-live>span,
#slKpiHeader .pcv164-kpi-status .pcx-readonly>i{
  width:6px!important;height:6px!important;border-radius:50%!important;background:#22c55e!important;display:inline-block!important
}
#slview-projectcontrol .project-control-heading.pcv164-heading-with-tools{
  grid-template-columns:minmax(235px,.8fr) minmax(560px,1.7fr)!important;
  align-items:center!important;
}
#slview-projectcontrol .pcv164-header-tools{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex-wrap:wrap!important;
  gap:7px!important;
  min-width:0!important;
}
#slview-projectcontrol .pcv164-header-tools .pcx-command-actions,
#slview-projectcontrol .pcv164-header-tools .pcx-saved-views,
#slview-projectcontrol .pcv164-header-tools .pcx-saved-entry{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  align-items:center!important;
  gap:7px!important;
  margin:0!important;
}
#slview-projectcontrol .pcv164-header-tools .pcx-btn,
#slview-projectcontrol .pcv164-header-tools .pc-action-btn{
  display:inline-flex!important;
  visibility:visible!important;
  opacity:1!important;
  height:32px!important;
  min-height:32px!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0 12px!important;
  border-radius:6px!important;
  border:1px solid rgba(255,255,255,.55)!important;
  background:rgba(255,255,255,.12)!important;
  color:#fff!important;
  font-size:11px!important;
  font-weight:850!important;
  line-height:1!important;
  white-space:nowrap!important;
}
#slview-projectcontrol .pcv164-header-tools #pcxKpiBtn,
#slview-projectcontrol .pcv164-header-tools #pcxSaveNamedView{
  background:#fff!important;
  border-color:#fff!important;
  color:#111827!important;
  box-shadow:0 1px 2px rgba(0,0,0,.18)!important;
}
#slview-projectcontrol .pcv164-header-tools .pcx-field{
  flex:0 0 130px!important;min-width:130px!important;max-width:130px!important;margin:0!important
}
#slview-projectcontrol .pcv164-header-tools .pcx-field input{
  width:130px!important;min-width:130px!important;max-width:130px!important;height:32px!important;
  padding:0 8px!important;border-radius:6px!important;background:#fff!important;color:#111827!important;
  border:1px solid rgba(255,255,255,.55)!important
}
#slview-projectcontrol .pcv164-header-tools .pcx-field span,
#slview-projectcontrol .pcv164-header-tools #pcxViewMessage,
#slview-projectcontrol .pcv164-header-tools .pcx-saved-list{display:none!important}
#slview-projectcontrol .project-control-heading-actions{display:none!important}
@media(max-width:1050px){
  #slview-projectcontrol .project-control-heading.pcv164-heading-with-tools{grid-template-columns:1fr!important}
  #slview-projectcontrol .pcv164-header-tools{justify-content:flex-start!important}
  #slKpiHeader .pcv164-kpi-status{right:10px!important}
}

/* ============================================================
   V165 — Project Control Center header normalization
   ============================================================ */
#slview-projectcontrol .project-control-heading.pcv165-heading-with-tools{
  display:grid!important;
  grid-template-columns:minmax(230px,.8fr) minmax(520px,1.7fr)!important;
  align-items:center!important;
  gap:14px!important;
}
#slview-projectcontrol .pcv165-header-tools{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex-wrap:wrap!important;
  gap:7px!important;
  min-width:0!important;
}
#slview-projectcontrol .pcv165-header-tools .pcx-command-actions,
#slview-projectcontrol .pcv165-header-tools .pcx-saved-views,
#slview-projectcontrol .pcv165-header-tools .pcx-saved-entry{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  align-items:center!important;
  gap:7px!important;
  margin:0!important;
}
#slview-projectcontrol .pcv165-header-tools .pcx-btn,
#slview-projectcontrol .pcv165-header-tools .pc-action-btn{
  display:inline-flex!important;
  visibility:visible!important;
  opacity:1!important;
  height:32px!important;
  min-height:32px!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0 12px!important;
  border-radius:6px!important;
  border:1px solid rgba(255,255,255,.55)!important;
  background:rgba(255,255,255,.12)!important;
  color:#fff!important;
  font-size:11px!important;
  font-weight:800!important;
  line-height:1!important;
  white-space:nowrap!important;
}
#slview-projectcontrol .pcv165-header-tools #pcxKpiBtn,
#slview-projectcontrol .pcv165-header-tools #pcxSaveNamedView{
  background:#fff!important;
  border-color:#fff!important;
  color:#111827!important;
}
#slview-projectcontrol .pcv165-header-tools .pcx-field{
  flex:0 0 130px!important;
  min-width:130px!important;
  max-width:130px!important;
  margin:0!important;
}
#slview-projectcontrol .pcv165-header-tools .pcx-field input{
  width:130px!important;
  min-width:130px!important;
  max-width:130px!important;
  height:32px!important;
  padding:0 8px!important;
  border-radius:6px!important;
  background:#fff!important;
  color:#111827!important;
  border:1px solid rgba(255,255,255,.55)!important;
}
#slview-projectcontrol .pcv165-header-tools .pcx-field span,
#slview-projectcontrol .pcv165-header-tools #pcxViewMessage,
#slview-projectcontrol .pcv165-header-tools .pcx-saved-list{display:none!important}
#slview-projectcontrol .project-control-heading-actions{
  display:flex!important;
  visibility:visible!important;
}
@media(max-width:1050px){
  #slview-projectcontrol .project-control-heading.pcv165-heading-with-tools{grid-template-columns:1fr!important}
  #slview-projectcontrol .pcv165-header-tools{justify-content:flex-start!important}
}

/* ============================================================
   V167 — PROJECT CONTROL BUTTON LAYOUT ONLY
   Baseline: V165. No feature, content, navigation, KPI, Today,
   header-block, cost-view or calculation changes.
   ============================================================ */
#slview-projectcontrol .project-control-heading.pcv165-heading-with-tools{
  grid-template-columns:minmax(220px,.72fr) minmax(0,2.28fr)!important;
  column-gap:16px!important;
}
#slview-projectcontrol .pcv165-header-tools{
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  width:100%!important;
  overflow:visible!important;
}
#slview-projectcontrol .pcv165-header-tools .pcx-command-actions,
#slview-projectcontrol .pcv165-header-tools .pcx-saved-views,
#slview-projectcontrol .pcv165-header-tools .pcx-saved-entry{
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:center!important;
  gap:8px!important;
  min-width:0!important;
}
#slview-projectcontrol .pcv165-header-tools .pcx-command-actions{
  flex:0 0 auto!important;
}
#slview-projectcontrol .pcv165-header-tools .pcx-saved-views{
  flex:0 1 auto!important;
}
#slview-projectcontrol .pcv165-header-tools .pcx-saved-entry{
  flex:0 1 auto!important;
}
#slview-projectcontrol .pcv165-header-tools .pcx-btn,
#slview-projectcontrol .pcv165-header-tools .pc-action-btn{
  box-sizing:border-box!important;
  height:34px!important;
  min-height:34px!important;
  padding:0 13px!important;
  border-radius:8px!important;
  font-size:11px!important;
  font-weight:800!important;
  letter-spacing:.01em!important;
  box-shadow:none!important;
  transform:none!important;
}
#slview-projectcontrol .pcv165-header-tools .pcx-btn:hover,
#slview-projectcontrol .pcv165-header-tools .pc-action-btn:hover{
  transform:none!important;
  box-shadow:0 2px 6px rgba(0,0,0,.18)!important;
}
#slview-projectcontrol .pcv165-header-tools #pcxKpiBtn,
#slview-projectcontrol .pcv165-header-tools #pcxSaveNamedView{
  min-width:92px!important;
  background:#fff!important;
  border-color:#fff!important;
  color:#111827!important;
}
#slview-projectcontrol .pcv165-header-tools #pcxClear{
  min-width:76px!important;
}
#slview-projectcontrol .pcv165-header-tools .pcx-field{
  flex:0 0 122px!important;
  min-width:122px!important;
  max-width:122px!important;
}
#slview-projectcontrol .pcv165-header-tools .pcx-field input{
  box-sizing:border-box!important;
  width:122px!important;
  min-width:122px!important;
  max-width:122px!important;
  height:34px!important;
  padding:0 10px!important;
  border-radius:8px!important;
  font-size:11px!important;
}
@media(max-width:1180px){
  #slview-projectcontrol .project-control-heading.pcv165-heading-with-tools{
    grid-template-columns:210px minmax(0,1fr)!important;
  }
  #slview-projectcontrol .pcv165-header-tools{
    flex-wrap:wrap!important;
    justify-content:flex-end!important;
  }
}
@media(max-width:900px){
  #slview-projectcontrol .project-control-heading.pcv165-heading-with-tools{
    grid-template-columns:1fr!important;
  }
  #slview-projectcontrol .pcv165-header-tools{
    justify-content:flex-start!important;
  }
}

/* ============================================================
   V168 — PROJECT CONTROL HEADER CONTROLS ONLY
   Baseline: V167. Visual/layout correction only for buttons and
   saved-view name input in the Project Control Center header.
   Reference proportions: V140 controls.
   ============================================================ */
#slview-projectcontrol .pcv165-header-tools{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  flex-flow:row wrap!important;
  align-items:center!important;
  justify-content:flex-end!important;
  align-content:center!important;
  gap:7px!important;
  width:100%!important;
  min-width:0!important;
  overflow:visible!important;
}
#slview-projectcontrol .pcv165-header-tools .pcx-command-actions,
#slview-projectcontrol .pcv165-header-tools .pcx-saved-views,
#slview-projectcontrol .pcv165-header-tools .pcx-saved-entry{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  flex-flow:row wrap!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:7px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
  min-width:0!important;
}
#slview-projectcontrol .pcv165-header-tools .pcx-btn,
#slview-projectcontrol .pcv165-header-tools .pc-action-btn{
  display:inline-flex!important;
  visibility:visible!important;
  opacity:1!important;
  box-sizing:border-box!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  min-width:0!important;
  height:32px!important;
  min-height:32px!important;
  padding:0 11px!important;
  margin:0!important;
  border:1px solid #59636f!important;
  border-radius:9px!important;
  background:#171b20!important;
  color:#ffffff!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:1!important;
  letter-spacing:0!important;
  white-space:nowrap!important;
  box-shadow:none!important;
  transform:none!important;
  cursor:pointer!important;
}
#slview-projectcontrol .pcv165-header-tools .pcx-btn:hover,
#slview-projectcontrol .pcv165-header-tools .pc-action-btn:hover{
  background:#222831!important;
  border-color:#7a8794!important;
  color:#ffffff!important;
  box-shadow:none!important;
  transform:none!important;
}
#slview-projectcontrol .pcv165-header-tools #pcxKpiBtn,
#slview-projectcontrol .pcv165-header-tools #pcxSaveNamedView{
  min-width:88px!important;
  background:#235f9f!important;
  border-color:#3578be!important;
  color:#ffffff!important;
}
#slview-projectcontrol .pcv165-header-tools #pcxKpiBtn:hover,
#slview-projectcontrol .pcv165-header-tools #pcxSaveNamedView:hover{
  background:#2c6dac!important;
  border-color:#4b8bc9!important;
}
#slview-projectcontrol .pcv165-header-tools .pcx-field{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  flex:0 0 150px!important;
  width:150px!important;
  min-width:150px!important;
  max-width:150px!important;
  padding:0!important;
  margin:0!important;
}
#slview-projectcontrol .pcv165-header-tools .pcx-field input,
#slview-projectcontrol .pcv165-header-tools #pcxViewName{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  box-sizing:border-box!important;
  width:150px!important;
  min-width:150px!important;
  max-width:150px!important;
  height:32px!important;
  min-height:32px!important;
  padding:0 10px!important;
  margin:0!important;
  border:1px solid #cfd7df!important;
  border-radius:9px!important;
  background:#ffffff!important;
  color:#18212b!important;
  font-size:12px!important;
  font-weight:600!important;
  line-height:32px!important;
  text-transform:none!important;
  letter-spacing:0!important;
  outline:none!important;
  box-shadow:none!important;
}
#slview-projectcontrol .pcv165-header-tools .pcx-field input:focus,
#slview-projectcontrol .pcv165-header-tools #pcxViewName:focus{
  border-color:#6da1d4!important;
  box-shadow:0 0 0 2px rgba(53,120,190,.22)!important;
}
#slview-projectcontrol .pcv165-header-tools .pcx-field input::placeholder,
#slview-projectcontrol .pcv165-header-tools #pcxViewName::placeholder{
  color:#7b8794!important;
  opacity:1!important;
}
@media(max-width:1180px){
  #slview-projectcontrol .pcv165-header-tools{
    justify-content:flex-start!important;
  }
  #slview-projectcontrol .pcv165-header-tools .pcx-command-actions,
  #slview-projectcontrol .pcv165-header-tools .pcx-saved-views,
  #slview-projectcontrol .pcv165-header-tools .pcx-saved-entry{
    justify-content:flex-start!important;
  }
}

/* ============================================================
   V169 — KPI MANAGER IN LEFT NAV + EXACT SINGLE-ROW TOOLBAR
   Only Project Control control placement and formatting changed.
   ============================================================ */
#slview-projectcontrol .pcv165-header-tools.pcv169-single-row-tools{
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:7px!important;
  width:100%!important;
  min-width:0!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:thin;
}
#slview-projectcontrol .pcv165-header-tools.pcv169-single-row-tools .pcx-field{
  flex:0 0 150px!important;
  width:150px!important;
  min-width:150px!important;
  max-width:150px!important;
  margin:0!important;
}
#slview-projectcontrol .pcv165-header-tools.pcv169-single-row-tools .pcx-btn,
#slview-projectcontrol .pcv165-header-tools.pcv169-single-row-tools .pc-action-btn{
  flex:0 0 auto!important;
  height:32px!important;
  min-height:32px!important;
  padding:0 11px!important;
  border-radius:8px!important;
  white-space:nowrap!important;
}
#slview-projectcontrol .pcv165-header-tools.pcv169-single-row-tools #pcxSaveNamedView{
  background:#235f9f!important;
  border-color:#3578be!important;
  color:#fff!important;
}
#slview-projectcontrol .pcv165-header-tools.pcv169-single-row-tools .pcv169-action-spacer{
  display:block!important;
  flex:0 0 18px!important;
  width:18px!important;
  height:1px!important;
}
#projectControlContainer .pcv140-sidebar .pcv169-kpi-sidebar-btn{
  order:0;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  width:100%!important;
  margin-top:3px!important;
  padding:8px 9px!important;
  border:1px solid #377fc0!important;
  border-radius:6px!important;
  background:#1f67a8!important;
  color:#fff!important;
  text-align:left!important;
  font-size:12px!important;
  font-weight:700!important;
  cursor:pointer!important;
}
#projectControlContainer .pcv140-sidebar .pcv169-kpi-sidebar-btn:hover{
  background:#2a75b8!important;
  border-color:#4b91cc!important;
}
#projectControlContainer .pcv140-sidebar .pcv169-kpi-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:4px;
  background:rgba(255,255,255,.18);
  font-size:13px;
  line-height:1;
}
#projectControlContainer .pcx-saved-views.pcv169-saved-list-only .pcx-saved-entry{
  display:none!important;
}
@media(max-width:1050px){
  #slview-projectcontrol .pcv165-header-tools.pcv169-single-row-tools{
    justify-content:flex-start!important;
  }
}

/* ============================================================
   V170 — SPLIT PROJECT CONTROL HEADER ACTIONS + COMBINED STATUS
   Left: View name / Save / Save current view / Clear All
   Right: Report / Print Report
   ============================================================ */
#slview-projectcontrol .pcv165-header-tools.pcv170-split-tools{
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:24px!important;
  width:100%!important;
  min-width:0!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
}
#slview-projectcontrol .pcv170-tools-left,
#slview-projectcontrol .pcv170-tools-right{
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:center!important;
  gap:7px!important;
  flex:0 0 auto!important;
}
#slview-projectcontrol .pcv170-tools-right{
  margin-left:auto!important;
  justify-content:flex-end!important;
}
#slview-projectcontrol .pcv170-tools-left .pcx-field{
  flex:0 0 150px!important;
  width:150px!important;
  min-width:150px!important;
  max-width:150px!important;
  margin:0!important;
}
#slview-projectcontrol .pcv170-split-tools .pcx-btn,
#slview-projectcontrol .pcv170-split-tools .pc-action-btn{
  flex:0 0 auto!important;
  height:32px!important;
  min-height:32px!important;
  padding:0 11px!important;
  border-radius:8px!important;
  white-space:nowrap!important;
}
#slview-projectcontrol .pcv170-split-tools #pcxSaveNamedView{
  background:#235f9f!important;
  border-color:#3578be!important;
  color:#fff!important;
}
#slview-projectcontrol .pcx-readonly.pcv170-combined-status{
  white-space:nowrap!important;
}

/* V171 — Today: current day, previous week, next-week forecast */
#projectControlContainer .pcv171-three-periods{display:flex;flex-direction:column;gap:12px}
#projectControlContainer .pcv171-period{border:1px solid #d9e0e7;border-radius:8px;background:#fff;overflow:hidden}
#projectControlContainer .pcv171-period>header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;background:#f7f9fb;border-bottom:1px solid #d9e0e7}
#projectControlContainer .pcv171-period>header small{display:block;font-size:10px;font-weight:800;letter-spacing:.08em;color:#64707c}
#projectControlContainer .pcv171-period>header h3{margin:2px 0 0;font-size:15px;color:#111827}
#projectControlContainer .pcv171-period-kpis{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
#projectControlContainer .pcv171-period-kpis span{padding:5px 8px;border:1px solid #d4dbe2;border-radius:999px;background:#fff;font-size:11px;color:#4b5563;white-space:nowrap}
#projectControlContainer .pcv171-sunday .pcv171-period.today{border-color:#efb5b5;background:#fff4f4}
#projectControlContainer .pcv171-sunday .pcv171-period.today>header{background:#fde8e8;border-bottom-color:#efb5b5}
#slview-projectcontrol .pcv171-saved-profile-cell{display:flex!important;align-items:center!important;gap:4px!important;max-width:220px!important;overflow-x:auto!important;white-space:nowrap!important;margin-left:0!important;padding:0!important}
#slview-projectcontrol .pcv171-saved-profile-cell .pcx-saved-item{display:inline-flex!important;align-items:center!important;flex:0 0 auto!important}
#slview-projectcontrol .pcv171-saved-profile-cell .pcx-saved-load{height:32px!important;padding:0 9px!important;border:1px solid #cfd7df!important;border-radius:8px 0 0 8px!important;background:#fff!important;font-size:11px!important;white-space:nowrap!important}
#slview-projectcontrol .pcv171-saved-profile-cell .pcx-saved-delete{height:32px!important;width:26px!important;border:1px solid #cfd7df!important;border-left:0!important;border-radius:0 8px 8px 0!important;background:#fff!important}
#slview-projectcontrol .pcv171-saved-profile-cell>.pcx-muted{display:inline-flex;align-items:center;height:32px;padding:0 9px;border:1px dashed #cfd7df;border-radius:8px;font-size:11px;white-space:nowrap}
@media(max-width:1100px){#projectControlContainer .pcv171-period>header{align-items:flex-start;flex-direction:column}.pcv171-period-kpis{justify-content:flex-start!important}}

/* ===== V172 PROJECT CONTROL — TODAY THREE-COLUMN RESOURCE VIEW ===== */
.pcv172-period-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:start}
.pcv172-period-grid .pcv171-period{margin:0;min-width:0;border:1px solid #d9e0e7;border-radius:9px;background:#fff;overflow:hidden}
.pcv172-period-grid .pcv171-period>header{display:block;padding:12px 14px;border-bottom:1px solid #d9e0e7}
.pcv172-period-grid .pcv171-period>header small{font-size:10px;font-weight:800;letter-spacing:.1em}
.pcv172-period-grid .pcv171-period>header h3{margin:3px 0 0;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pcv172-period-grid .pcv171-period.previous>header{background:#eef1f4;color:#374151}
.pcv172-period-grid .pcv171-period.today>header{background:#00B050;color:#fff}
.pcv172-period-grid .pcv171-period.next>header{background:#0066CC;color:#fff}
.pcv172-period-grid .pcv163-table-wrap{border:0;border-radius:0;max-height:58vh}
.pcv172-period-grid .pcv163-table{table-layout:fixed;font-size:11px}
.pcv172-period-grid .pcv163-table th,.pcv172-period-grid .pcv163-table td{padding:8px 9px;overflow:hidden;text-overflow:ellipsis}
.pcv172-period-grid .pcv163-table th:nth-child(1){width:48%}
.pcv172-period-grid .pcv163-table th:nth-child(2){width:32%}
.pcv172-period-grid .pcv163-table th:nth-child(3){width:20%;text-align:center}
.pcv172-period-grid .pcv163-table td:nth-child(3){text-align:center;font-weight:700}
@media(max-width:1050px){.pcv172-period-grid{grid-template-columns:1fr}.pcv172-period-grid .pcv163-table-wrap{max-height:none}}


/* ================= AI POT v173 — contextual floating project assistant ================= */
.aipot-floating{position:fixed;right:22px;bottom:22px;z-index:160;pointer-events:none}
.aipot-launcher{pointer-events:auto;position:relative;width:58px;height:58px;border:0;border-radius:18px;background:linear-gradient(145deg,#1c26b7,#0066cc);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 14px 34px rgba(28,38,183,.34);transition:transform .18s ease,box-shadow .18s ease,opacity .18s ease}
.aipot-launcher:hover{transform:translateY(-3px);box-shadow:0 18px 38px rgba(28,38,183,.42)}
.aipot-launcher svg{width:27px;height:27px}
.aipot-launcher-label{position:absolute;right:-5px;bottom:-5px;min-width:24px;height:24px;border-radius:999px;background:#00b050;color:#fff;border:3px solid #fff;font-size:.62rem;font-weight:900;display:flex;align-items:center;justify-content:center}
.dark .aipot-launcher-label{border-color:#030712}
.aipot-launcher-pulse{position:absolute;inset:-5px;border-radius:22px;border:2px solid rgba(0,176,80,.35);animation:aipotLauncherPulse 2.4s ease-out infinite}
@keyframes aipotLauncherPulse{0%{transform:scale(.88);opacity:.9}75%,100%{transform:scale(1.22);opacity:0}}
.aipot-panel{pointer-events:auto;position:absolute;right:0;bottom:0;width:min(410px,calc(100vw - 28px));height:min(690px,calc(100vh - 92px));display:flex;flex-direction:column;background:rgba(255,255,255,.98);border:1px solid rgba(148,163,184,.32);border-radius:20px;box-shadow:0 24px 70px rgba(15,23,42,.28);overflow:hidden;opacity:0;visibility:hidden;transform:translateY(16px) scale(.97);transform-origin:bottom right;transition:opacity .18s ease,transform .18s ease,visibility .18s}
.dark .aipot-panel{background:rgba(10,15,28,.98);border-color:rgba(148,163,184,.22);box-shadow:0 24px 70px rgba(0,0,0,.58)}
.aipot-floating.is-open .aipot-panel{opacity:1;visibility:visible;transform:none}
.aipot-floating.is-open .aipot-launcher{opacity:0;visibility:hidden;transform:scale(.8)}
.aipot-panel-head{display:grid;grid-template-columns:42px minmax(0,1fr) 34px 34px;gap:9px;align-items:center;padding:14px 14px 12px;background:linear-gradient(120deg,#1c26b7,#0066cc);color:#fff}
.aipot-brand-mark{width:40px;height:40px;border-radius:13px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.25);display:flex;align-items:center;justify-content:center;font-size:.72rem;font-weight:900;letter-spacing:.04em}
.aipot-head-copy{display:flex;flex-direction:column;min-width:0}.aipot-head-copy strong{font-size:.9rem;line-height:1.25}.aipot-head-copy span{font-size:.68rem;color:rgba(255,255,255,.78);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.aipot-icon-btn{width:32px;height:32px;border:0;border-radius:9px;background:rgba(255,255,255,.12);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer}.aipot-icon-btn:hover{background:rgba(255,255,255,.24)}.aipot-icon-btn svg{width:17px;height:17px}
.aipot-contextbar{display:flex;align-items:center;gap:7px;padding:8px 14px;border-bottom:1px solid #e5e7eb;background:#f8fafc;color:#475569;font-size:.68rem;font-weight:700}
.dark .aipot-contextbar{background:#111827;border-color:#263244;color:#cbd5e1}
.aipot-live-dot{width:7px;height:7px;border-radius:50%;background:#00b050;box-shadow:0 0 0 4px rgba(0,176,80,.12)}
.aipot-readonly-chip{margin-left:auto;padding:2px 7px;border-radius:999px;background:#e0f2fe;color:#0369a1;font-size:.6rem;text-transform:uppercase;letter-spacing:.04em}
.dark .aipot-readonly-chip{background:#0c4a6e;color:#bae6fd}
.aipot-welcome{display:flex;gap:10px;margin:13px 13px 3px;padding:11px;border-radius:12px;background:linear-gradient(120deg,rgba(28,38,183,.07),rgba(0,176,80,.08));border:1px solid rgba(28,38,183,.1);color:#1f2937}
.dark .aipot-welcome{color:#e5e7eb;background:linear-gradient(120deg,rgba(59,130,246,.12),rgba(0,176,80,.1));border-color:rgba(148,163,184,.16)}
.aipot-welcome-icon{width:27px;height:27px;flex:0 0 27px;border-radius:9px;background:#1c26b7;color:#fff;display:flex;align-items:center;justify-content:center;font-size:.8rem}.aipot-welcome strong{font-size:.76rem}.aipot-welcome p{font-size:.68rem;color:#64748b;margin-top:2px;line-height:1.35}.dark .aipot-welcome p{color:#94a3b8}
.aipot-panel .aipot-chips{padding:7px 13px 4px;margin:0;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}.aipot-panel .aipot-chips::-webkit-scrollbar{display:none}.aipot-panel .aipot-chip{flex:0 0 auto;padding:6px 10px;font-size:.66rem;background:#fff}.dark .aipot-panel .aipot-chip{background:#172033}
.aipot-panel .aipot-chat{flex:1;min-height:0;max-height:none;margin:4px 10px 0;border:0;border-radius:13px;background:#f5f7fb;padding:12px 10px}.dark .aipot-panel .aipot-chat{background:#0b1220}
.aipot-panel .aipot-chat-empty{display:flex;flex-direction:column;gap:4px;padding:24px 18px;line-height:1.4}.aipot-panel .aipot-chat-empty strong{color:#334155;font-size:.78rem}.aipot-panel .aipot-chat-empty span{font-size:.69rem}.dark .aipot-panel .aipot-chat-empty strong{color:#cbd5e1}
.aipot-panel .aipot-msg{max-width:88%;font-size:.78rem;padding:9px 11px;border-radius:13px;box-shadow:0 1px 1px rgba(15,23,42,.05)}
.aipot-panel .aipot-msg-user{background:linear-gradient(135deg,#1c26b7,#0066cc)}
.aipot-panel .aipot-msg-assistant{background:#fff;border:1px solid #e5e7eb}.dark .aipot-panel .aipot-msg-assistant{background:#172033;border-color:#263244}
.aipot-panel .aipot-error{margin:5px 13px 0}
.aipot-panel .aipot-inputbar{margin:0;padding:10px 11px 7px;border-top:1px solid #e5e7eb;background:#fff;align-items:center}.dark .aipot-panel .aipot-inputbar{background:#0f172a;border-color:#263244}
.aipot-panel .aipot-input{min-height:42px;max-height:105px;border-radius:13px;padding:10px 12px;background:#f8fafc;border-color:#dbe3ee}.dark .aipot-panel .aipot-input{background:#111827;border-color:#334155}
.aipot-send-btn{width:42px;height:42px;flex:0 0 42px;border:0;border-radius:13px;background:linear-gradient(145deg,#1c26b7,#0066cc);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 7px 16px rgba(28,38,183,.22)}.aipot-send-btn:hover{filter:brightness(1.08)}.aipot-send-btn:disabled{opacity:.5;cursor:not-allowed}.aipot-send-btn svg{width:18px;height:18px}
.aipot-disclaimer{text-align:center;padding:0 12px 9px;background:#fff;color:#94a3b8;font-size:.59rem}.dark .aipot-disclaimer{background:#0f172a}
@media(max-width:640px){.aipot-floating{right:10px;bottom:10px}.aipot-panel{position:fixed;inset:70px 8px 8px;width:auto;height:auto;border-radius:17px}.aipot-launcher{width:54px;height:54px;border-radius:17px}}

/* ===== v174 AI POT — GENERAL INTELLIGENCE WORKSPACE ===== */
.aipot-workspace-shell{max-width:1600px;margin:0 auto;padding:16px;display:grid;grid-template-columns:minmax(0,1fr) 390px;gap:16px;align-items:start;min-height:calc(100vh - 62px)}
.aipot-result-sheet,.aipot-hub-chat-panel{background:#fff;border:1px solid #dbe3ee;border-radius:16px;box-shadow:0 10px 30px rgba(15,23,42,.07)}
.dark .aipot-result-sheet,.dark .aipot-hub-chat-panel{background:#111827;border-color:#334155}
.aipot-result-sheet{min-height:calc(100vh - 94px);overflow:hidden}
.aipot-sheet-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 20px;border-bottom:1px solid #e5e7eb;background:linear-gradient(180deg,#fff,#f8fafc)}
.dark .aipot-sheet-toolbar{border-color:#334155;background:#111827}
.aipot-sheet-eyebrow{font-size:10px;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:#64748b;margin-bottom:3px}
.aipot-sheet-toolbar h2{font-size:20px;font-weight:800;color:#0f172a;margin:0}.dark .aipot-sheet-toolbar h2{color:#f8fafc}
.aipot-sheet-toolbar p{font-size:12px;color:#64748b;margin-top:3px;max-width:760px}
.aipot-sheet-actions{display:flex;gap:8px;flex-wrap:wrap}.aipot-sheet-btn{border:1px solid #cbd5e1;background:#fff;color:#334155;border-radius:9px;padding:7px 10px;font-size:11px;font-weight:700}.aipot-sheet-btn:hover{background:#f1f5f9}.dark .aipot-sheet-btn{background:#1f2937;border-color:#475569;color:#e5e7eb}
.aipot-result-canvas{padding:20px;min-height:620px}
.aipot-empty-workspace{display:grid;place-items:center;min-height:560px;text-align:center;color:#64748b;padding:40px}.aipot-empty-icon{width:72px;height:72px;border-radius:22px;display:grid;place-items:center;margin:0 auto 16px;background:linear-gradient(135deg,#0d47a1,#6d28d9);color:#fff;font-size:30px;font-weight:900}.aipot-empty-workspace h3{font-size:22px;color:#0f172a;font-weight:800}.dark .aipot-empty-workspace h3{color:#f8fafc}.aipot-empty-workspace p{max-width:560px;margin:8px auto 0;font-size:13px}.aipot-empty-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:24px;width:100%;max-width:760px}.aipot-empty-card{border:1px solid #e2e8f0;border-radius:12px;padding:14px;text-align:left;background:#f8fafc}.dark .aipot-empty-card{background:#1f2937;border-color:#334155}.aipot-empty-card strong{display:block;color:#1e293b;font-size:12px}.dark .aipot-empty-card strong{color:#f1f5f9}.aipot-empty-card span{display:block;color:#64748b;font-size:11px;margin-top:4px}
.aipot-hub-chat-panel{position:sticky;top:78px;height:calc(100vh - 94px);display:flex;flex-direction:column;overflow:hidden}
.aipot-hub-chat-head{display:flex;justify-content:space-between;gap:10px;padding:16px;border-bottom:1px solid #e5e7eb}.dark .aipot-hub-chat-head{border-color:#334155}.aipot-hub-chat-title{font-size:14px;font-weight:800;color:#0f172a;display:flex;align-items:center;gap:7px}.dark .aipot-hub-chat-title{color:#f8fafc}.aipot-hub-chat-head p{font-size:10px;color:#64748b;margin-top:2px}.aipot-hub-chips{padding:10px 12px 4px;flex:0 0 auto}.aipot-hub-chat{flex:1;min-height:0;margin:6px 12px;border-radius:12px;background:#f8fafc;border:1px solid #e2e8f0;padding:10px}.dark .aipot-hub-chat{background:#0f172a;border-color:#334155}.aipot-hub-inputbar{margin:0 12px 10px;border:1px solid #cbd5e1;border-radius:14px;padding:7px;background:#fff}.dark .aipot-hub-inputbar{background:#111827;border-color:#475569}.aipot-hub-footnote{font-size:9px;color:#94a3b8;padding:0 14px 12px;text-align:center}
.aipot-result-hero{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;padding:18px;border-radius:14px;background:linear-gradient(135deg,#0f2f56,#4338ca);color:#fff;margin-bottom:16px}.aipot-result-hero h3{font-size:22px;font-weight:800;margin:0}.aipot-result-hero p{font-size:12px;color:rgba(255,255,255,.78);margin-top:5px;max-width:720px}.aipot-result-badge{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.1em;background:rgba(255,255,255,.14);padding:6px 9px;border-radius:999px;white-space:nowrap}
.aipot-result-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:16px}.aipot-result-metric{border:1px solid #e2e8f0;border-radius:12px;padding:13px;background:#fff}.dark .aipot-result-metric{background:#1f2937;border-color:#334155}.aipot-result-metric span{font-size:10px;color:#64748b;text-transform:uppercase;font-weight:800;letter-spacing:.08em}.aipot-result-metric strong{display:block;margin-top:5px;font-size:21px;color:#0f172a}.dark .aipot-result-metric strong{color:#f8fafc}.aipot-result-section{border:1px solid #e2e8f0;border-radius:14px;background:#fff;margin-top:12px;overflow:hidden}.dark .aipot-result-section{background:#111827;border-color:#334155}.aipot-result-section-head{padding:12px 14px;border-bottom:1px solid #e2e8f0;display:flex;justify-content:space-between;gap:10px;align-items:center}.dark .aipot-result-section-head{border-color:#334155}.aipot-result-section-head h4{font-size:13px;font-weight:800;color:#0f172a}.dark .aipot-result-section-head h4{color:#f8fafc}.aipot-result-section-body{padding:14px;font-size:13px;color:#334155;line-height:1.6;white-space:pre-wrap}.dark .aipot-result-section-body{color:#d1d5db}.aipot-result-table{width:100%;border-collapse:collapse;font-size:11px}.aipot-result-table th,.aipot-result-table td{padding:9px 10px;border-bottom:1px solid #e2e8f0;text-align:left}.dark .aipot-result-table th,.dark .aipot-result-table td{border-color:#334155}.aipot-result-table th{font-size:9px;text-transform:uppercase;letter-spacing:.08em;color:#64748b;background:#f8fafc}.dark .aipot-result-table th{background:#1f2937}.aipot-result-list{display:grid;gap:8px}.aipot-result-list-item{display:flex;gap:10px;align-items:flex-start;padding:10px;border:1px solid #e2e8f0;border-radius:10px}.dark .aipot-result-list-item{border-color:#334155}.aipot-result-list-item b{color:#0f172a}.dark .aipot-result-list-item b{color:#f8fafc}.aipot-result-index{width:24px;height:24px;border-radius:7px;background:#e0e7ff;color:#3730a3;display:grid;place-items:center;font-weight:800;font-size:10px;flex:0 0 auto}.aipot-result-meta{margin-top:12px;font-size:10px;color:#94a3b8;text-align:right}
@media(max-width:1050px){.aipot-workspace-shell{grid-template-columns:1fr}.aipot-hub-chat-panel{position:relative;top:auto;height:560px;grid-row:1}.aipot-result-sheet{grid-row:2}.aipot-result-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.aipot-workspace-shell{padding:8px}.aipot-sheet-toolbar{flex-direction:column}.aipot-result-canvas{padding:12px}.aipot-empty-grid,.aipot-result-grid{grid-template-columns:1fr}.aipot-result-hero{flex-direction:column}.aipot-hub-chat-panel{height:520px}}

/* AI Eagle v176 compact corporate branding */
.ai-eagle-brand{display:flex;align-items:center;gap:10px;min-width:210px}
.ai-eagle-brand img{width:44px;height:44px;object-fit:contain;border-radius:10px;background:#fff;border:1px solid #dbe4ef;padding:4px}
.ai-eagle-brand strong{display:block;font-size:18px;line-height:1.1;color:#10233f}
.ai-eagle-brand span{display:block;font-size:11px;color:#6b7b93;margin-top:3px}
@media(max-width:760px){.ai-eagle-brand{min-width:0}.ai-eagle-brand span{display:none}.ai-eagle-brand img{width:36px;height:36px}}


/* v183 — AI Eagle Experience / Response Modes */
.aipot-mode-control{display:flex;align-items:center;gap:8px;margin-top:10px;font-size:11px;font-weight:800;color:#64748b}
.aipot-mode-control select{min-width:150px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#10233f;padding:6px 28px 6px 9px;font-size:12px;font-weight:800}
.aipot-experience-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}
.aipot-experience-card{border:1px solid #dbe4ef;border-radius:12px;background:#fff;padding:12px}
.aipot-experience-card span{display:block;color:#6b7b93;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.05em}
.aipot-experience-card strong{display:block;margin-top:4px;color:#10233f;font-size:18px}
.aipot-result-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.aipot-result-action{border:1px solid #cbd5e1;border-radius:999px;background:#f8fafc;padding:6px 10px;font-size:11px;font-weight:800;color:#334155}
.aipot-result-body{white-space:pre-wrap;line-height:1.55}
.dark .aipot-mode-control select,.dark .aipot-experience-card{background:#111827;color:#e5e7eb;border-color:#374151}
.dark .aipot-experience-card strong{color:#f8fafc}
@media(max-width:760px){.aipot-experience-strip{grid-template-columns:1fr}.aipot-mode-control{align-items:flex-start;flex-direction:column}.aipot-mode-control select{width:100%}}


/* ONE v204 — compact NC / Issues layout */
.nc-issues-table thead th { text-align:center !important; vertical-align:middle !important; }
.nc-number-composite { display:flex; align-items:center; gap:3.78px; white-space:nowrap; }
.nc-year-fixed { width:38px; height:34px; display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; border:1px solid #cbd5e1; border-radius:5px; background:#f1f5f9; color:#334155; font-weight:700; }
.nc-number-slash { display:inline-flex; align-items:center; justify-content:center; height:34px; font-weight:800; color:#475569; }
.nc-sequence-input { width:76px !important; height:34px; text-align:center; }
.nc-attachments-cell { min-width:118px; max-width:220px; vertical-align:middle; }
.nc-attachments-cell .layout-toolbar-compact { display:flex; align-items:center; justify-content:flex-start; padding:0; margin:0; min-height:34px; }
.nc-attachments-cell .nc-inline-upload { height:34px; box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; margin:0; white-space:nowrap; }
.nc-attachments-cell .layout-grid-compact { display:flex !important; flex-direction:row; flex-wrap:nowrap; align-items:center; gap:5px; overflow-x:auto; overflow-y:hidden; padding:5px 0 0; max-width:220px; }
.nc-attachments-cell .layout-card-compact { flex:0 0 48px; width:48px; min-width:48px; border:0; background:transparent; box-shadow:none; }
.nc-attachments-cell .layout-card-compact .layout-card-thumb { width:48px; height:48px; min-height:48px; aspect-ratio:1/1; border-radius:5px; overflow:hidden; border:1px solid #cbd5e1; }
.nc-attachments-cell .layout-card-compact .layout-card-thumb img { width:100%; height:100%; object-fit:cover; }
.nc-attachments-cell .layout-card-compact .layout-card-badge { display:none; }
.nc-attachments-cell .layout-card-compact .layout-card-delete { width:17px; height:17px; min-width:17px; right:2px; top:2px; font-size:12px; line-height:15px; }
.dark .nc-year-fixed { background:#334155; color:#f8fafc; border-color:#64748b; }


/* ONE v205 — NC / Issues alignment and attachment ordering */
.nc-issues-table thead th,
.nc-issues-table tbody td { vertical-align:middle !important; }
.nc-issues-table thead th:nth-child(2),
.nc-issues-table tbody td:nth-child(2),
.nc-issues-table thead th:nth-child(6),
.nc-issues-table tbody td:nth-child(6) { text-align:center !important; }
.nc-issues-table tbody td:nth-child(2) .tt0-input { margin-inline:auto; }
.nc-issues-table tbody td:nth-child(6) .nc-attachments-cell { margin-inline:auto; }

.nc-issues-table tbody .tt0-input,
.nc-issues-table tbody .select-input,
.nc-issues-table tbody .tt0-btn-sm,
.nc-issues-table tbody .nc-inline-upload,
.nc-issues-table tbody .nc-registry-sent-badge,
.nc-issues-table tbody .nc-year-fixed,
.nc-issues-table tbody .nc-number-slash,
.nc-issues-table tbody .nc-sequence-input {
  height:36px !important;
  min-height:36px !important;
  box-sizing:border-box !important;
}
.nc-issues-table tbody .tt0-input,
.nc-issues-table tbody .select-input {
  padding-top:0 !important;
  padding-bottom:0 !important;
  line-height:34px !important;
}
.nc-issues-table tbody .select-input { line-height:normal !important; }
.nc-issues-table tbody .tt0-btn-sm,
.nc-issues-table tbody .nc-inline-upload,
.nc-issues-table tbody .nc-registry-sent-badge {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
  line-height:1 !important;
  white-space:nowrap;
}
.nc-issues-table tbody td:first-child,
.nc-issues-table tbody td:last-child { text-align:center !important; }

.nc-attachments-cell { min-width:118px; max-width:240px; }
.nc-attachments-cell .layout-toolbar-compact {
  justify-content:center !important;
  min-height:36px !important;
}
.nc-attachments-cell .layout-grid-compact {
  flex-direction:row !important;
  justify-content:flex-start !important;
  align-items:flex-start !important;
  direction:ltr !important;
  gap:6px !important;
  max-width:240px !important;
  padding:6px 0 0 !important;
}
.nc-attachments-cell .layout-card-compact {
  display:flex !important;
  flex:0 0 48px !important;
  width:48px !important;
  min-width:48px !important;
  flex-direction:column !important;
  align-items:center !important;
  gap:3px !important;
}
.nc-attachments-cell .layout-card-compact .layout-card-delete-below {
  position:static !important;
  inset:auto !important;
  width:18px !important;
  height:18px !important;
  min-width:18px !important;
  padding:0 !important;
  border-radius:50% !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  line-height:1 !important;
  font-size:13px !important;
  margin:0 auto !important;
}


/* ONE v206 — NC compact attachments under Delete */
.nc-issues-table tbody tr.nc-main-row td { border-bottom:0 !important; }
.nc-issues-table tbody tr.nc-attachments-row td {
  padding:0 8px 8px 12px !important;
  border-top:0 !important;
  text-align:left !important;
  vertical-align:top !important;
}
.nc-upload-only { min-width:118px; max-width:240px; margin-inline:auto; }
.nc-upload-only .layout-toolbar-compact { justify-content:center !important; }
.nc-attachments-strip {
  display:block;
  max-width:100%;
  overflow:hidden;
}
.nc-attachments-strip .layout-grid-compact {
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:nowrap !important;
  justify-content:flex-start !important;
  align-items:flex-start !important;
  direction:ltr !important;
  gap:6px !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  max-width:100% !important;
  padding:2px 0 0 !important;
  scrollbar-width:thin;
}
.nc-attachments-strip .layout-card-compact {
  display:flex !important;
  flex:0 0 60px !important;
  width:60px !important;
  min-width:60px !important;
  flex-direction:column !important;
  align-items:center !important;
  gap:3px !important;
}
.nc-attachments-strip .layout-card-compact .layout-card-thumb {
  width:60px !important;
  height:60px !important;
  min-height:60px !important;
  border:1px solid #e5e7eb !important;
  border-radius:6px !important;
  overflow:hidden !important;
  background:#fff !important;
}
.nc-attachments-strip .layout-card-compact .layout-card-thumb img {
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
}
.nc-attachments-strip .layout-card-compact .layout-card-delete-below {
  position:static !important;
  inset:auto !important;
  width:18px !important;
  height:18px !important;
  min-width:18px !important;
  padding:0 !important;
  border-radius:50% !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  line-height:1 !important;
  font-size:13px !important;
  margin:0 auto !important;
}

/* ===== ONE v209 — AI Eagle UI Freeze ===== */
.aipot-workspace-shell{max-width:1700px;padding:12px;grid-template-columns:minmax(0,3fr) minmax(300px,1fr);gap:12px;min-height:calc(100vh - 58px)}
.aipot-result-sheet,.aipot-hub-chat-panel{border-radius:14px;box-shadow:0 8px 24px rgba(15,23,42,.06)}
.aipot-result-sheet{height:calc(100vh - 82px);min-height:640px}
.aipot-result-canvas{padding:12px;height:100%;min-height:0;overflow:auto}
.aipot-hub-chat-panel{top:70px;height:calc(100vh - 82px)}
.aipot-hub-chat-head{padding:12px 14px}
.aipot-hub-chat-head p{margin-top:1px}
.aipot-hub-chips{padding:8px 10px 2px;gap:5px}
.aipot-hub-chips .aipot-chip{padding:5px 9px;font-size:10px}
.aipot-hub-chat{margin:5px 10px;padding:8px}
.aipot-hub-inputbar{margin:0 10px 8px}
.aipot-hub-footnote{display:none}
.aipot-result-hero{align-items:center;padding:13px 15px;margin-bottom:10px;border-radius:12px;background:linear-gradient(135deg,#0b4ea2,#1f6fc5)}
.aipot-result-hero h3{font-size:18px;line-height:1.2}
.aipot-result-hero p{font-size:11px;margin-top:3px}
.aipot-result-hero-tools{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.aipot-workspace-status{display:inline-flex;align-items:center;gap:6px;font-size:10px;font-weight:800;background:rgba(255,255,255,.14);padding:6px 9px;border-radius:999px;white-space:nowrap}
.aipot-workspace-status:before{content:'';width:7px;height:7px;border-radius:50%;background:#86efac;box-shadow:0 0 0 3px rgba(134,239,172,.16)}
.aipot-hero-btn{border:1px solid rgba(255,255,255,.32);background:rgba(255,255,255,.12);color:#fff;border-radius:8px;padding:6px 9px;font-size:10px;font-weight:800;cursor:pointer}
.aipot-hero-btn:hover{background:rgba(255,255,255,.22)}
.aipot-context-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 8px;padding:7px 9px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc}
.aipot-context-toolbar strong{font-size:11px;color:#334155}
.aipot-context-actions{display:flex;gap:5px;flex-wrap:wrap}
.aipot-context-action{border:1px solid #cbd5e1;background:#fff;color:#334155;border-radius:8px;padding:5px 8px;font-size:10px;font-weight:800;cursor:pointer}
.aipot-context-action:hover{background:#eef4fb;border-color:#94a3b8}
.aipot-result-section{margin-top:8px;border-radius:11px}
.aipot-result-section-head{padding:9px 11px}
.aipot-result-section-head h4{font-size:12px}
.aipot-result-section-body{padding:11px;font-size:12px;line-height:1.55}
.aipot-result-actions{display:none}
.aipot-result-meta{margin:8px 2px 0;font-size:9px}
.aipot-related-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}
.aipot-related-card{border:1px solid #dbe4ef;border-radius:10px;background:#f8fafc;padding:9px;text-align:left}
.aipot-related-card strong{display:block;font-size:11px;color:#10233f}
.aipot-related-card span{display:block;font-size:9px;color:#64748b;margin-top:2px}
.aipot-empty-workspace{min-height:100%;padding:0;display:block;text-align:left}
.aipot-empty-workspace .aipot-result-hero{margin-bottom:10px}
.aipot-empty-body{display:grid;place-items:center;min-height:470px;text-align:center;color:#64748b;padding:32px}
.aipot-empty-body .aipot-empty-icon{width:58px;height:58px;border-radius:17px;margin-bottom:12px;font-size:23px;background:#0b4ea2}
.aipot-empty-body h3{font-size:19px}
.aipot-empty-body p{font-size:12px}
.aipot-empty-grid{margin-top:18px;max-width:700px;gap:8px}
.aipot-empty-card{padding:11px}
.dark .aipot-context-toolbar,.dark .aipot-related-card{background:#111827;border-color:#334155}
.dark .aipot-context-toolbar strong,.dark .aipot-related-card strong{color:#f8fafc}
@media(max-width:1050px){.aipot-workspace-shell{grid-template-columns:1fr}.aipot-result-sheet{height:auto;min-height:650px}.aipot-hub-chat-panel{height:520px;grid-row:2}.aipot-result-sheet{grid-row:1}.aipot-related-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.aipot-result-hero{align-items:flex-start;flex-direction:column}.aipot-result-hero-tools{justify-content:flex-start}.aipot-context-toolbar{align-items:flex-start;flex-direction:column}.aipot-related-grid{grid-template-columns:1fr}}

/* ===== ONE v209 RC2 — full-width response header and edge-aligned chat ===== */
@media (min-width:1051px){
  .aipot-workspace-shell{
    width:100%;
    max-width:none;
    margin:0;
    padding:12px 0 12px 12px;
    grid-template-columns:minmax(0,3fr) minmax(300px,1fr);
    gap:12px;
  }
  .aipot-hub-chat-panel{
    border-right:0;
    border-radius:14px 0 0 14px;
  }
}

.aipot-result-hero{
  width:calc(100% + 24px);
  margin-left:-12px;
  margin-right:-12px;
  border-radius:14px 14px 0 0;
}

/* ===== ONE v210 — AI Eagle Smart Workspace ===== */
.aipot-smart-context{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 8px;padding:7px 9px;border:1px solid #dbe4ef;border-radius:10px;background:#f8fafc}
.aipot-smart-context span{display:inline-flex;align-items:center;gap:5px;padding:4px 7px;border-radius:7px;background:#fff;border:1px solid #e2e8f0;color:#475569;font-size:9px;white-space:nowrap}
.aipot-smart-context b{color:#0b4ea2;font-size:8px;text-transform:uppercase;letter-spacing:.04em}
.aipot-sources-panel{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px;padding:10px 11px;border:1px solid #dbe4ef;border-radius:11px;background:#f8fafc}
.aipot-sources-panel>div:first-child{min-width:130px}.aipot-sources-panel strong{display:block;font-size:11px;color:#10233f}.aipot-sources-panel>div:first-child span{display:block;font-size:9px;color:#64748b;margin-top:2px}
.aipot-source-tags{display:flex;justify-content:flex-end;gap:5px;flex-wrap:wrap}.aipot-source-tags span{font-size:9px;font-weight:700;color:#166534;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:999px;padding:4px 7px}
.aipot-suggested-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px;padding:9px 11px;border:1px solid #bfdbfe;border-radius:11px;background:#eff6ff}
.aipot-suggested-actions strong{font-size:11px;color:#0b4ea2;white-space:nowrap}.aipot-suggested-actions>div{display:flex;justify-content:flex-end;gap:5px;flex-wrap:wrap}.aipot-suggested-actions button{border:1px solid #93c5fd;background:#fff;color:#1e3a5f;border-radius:8px;padding:5px 8px;font-size:9px;font-weight:800;cursor:pointer}.aipot-suggested-actions button:hover{background:#dbeafe}
.aipot-analysis-progress{min-height:100%;display:grid;place-content:center;gap:16px;padding:40px;text-align:left}.aipot-progress-head{display:flex;align-items:center;gap:14px}.aipot-progress-head h3{font-size:18px;color:#10233f}.aipot-progress-head p{font-size:11px;color:#64748b;margin-top:3px}.aipot-progress-steps{display:grid;gap:7px;padding-left:42px}.aipot-progress-steps span{position:relative;color:#94a3b8;font-size:11px}.aipot-progress-steps span:before{content:'';position:absolute;left:-17px;top:4px;width:7px;height:7px;border-radius:50%;background:#cbd5e1}.aipot-progress-steps span.active{color:#0b4ea2;font-weight:800}.aipot-progress-steps span.active:before{background:#0b4ea2;box-shadow:0 0 0 4px rgba(11,78,162,.12)}
.dark .aipot-smart-context,.dark .aipot-sources-panel{background:#111827;border-color:#334155}.dark .aipot-smart-context span{background:#0f172a;border-color:#334155;color:#cbd5e1}.dark .aipot-sources-panel strong,.dark .aipot-progress-head h3{color:#f8fafc}.dark .aipot-suggested-actions{background:#10233f;border-color:#1d4f8c}.dark .aipot-suggested-actions strong{color:#bfdbfe}
@media(max-width:760px){.aipot-sources-panel,.aipot-suggested-actions{align-items:flex-start;flex-direction:column}.aipot-source-tags,.aipot-suggested-actions>div{justify-content:flex-start}.aipot-smart-context span{white-space:normal}.aipot-analysis-progress{padding:24px}.aipot-progress-steps{padding-left:24px}}

/* ===== ONE v211 — AI Eagle full-width workspace with bottom composer ===== */
.aipot-main-header{
  background:linear-gradient(112deg,#073c86 0%,#0b4ea2 52%,#0750aa 100%);
  color:#fff;
  box-shadow:0 7px 20px rgba(7,60,134,.18);
}
.aipot-main-header-inner{
  min-height:88px;
  padding:13px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}
.aipot-brand-group{display:flex;align-items:center;gap:15px;min-width:0}
.aipot-brand-logo{display:flex;align-items:center;padding:6px 10px;background:#fff;border-radius:10px}
.aipot-brand-logo img{height:35px;width:auto;display:block}
.aipot-brand-divider{width:1px;height:48px;background:rgba(255,255,255,.34)}
.aipot-brand-copy h1{margin:0;font-size:21px;line-height:1.15;font-weight:800;letter-spacing:-.02em;white-space:nowrap}
.aipot-brand-copy h1 span{font-weight:700}
.aipot-brand-copy p{margin:5px 0 0;font-size:12px;color:rgba(255,255,255,.82)}
.aipot-header-nav{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.aipot-header-nav button{border:1px solid rgba(255,255,255,.24);background:rgba(255,255,255,.11);color:#fff;border-radius:9px;padding:7px 11px;font-size:11px;font-weight:700;cursor:pointer}
.aipot-header-nav button:hover{background:rgba(255,255,255,.2)}

.aipot-workspace-shell.aipot-workspace-bottom-chat{
  display:block;
  width:100%;
  max-width:none;
  margin:0;
  padding:12px 14px 8px;
  min-height:calc(100vh - 88px);
  background:#f5f8fc;
}
.aipot-workspace-bottom-chat .aipot-result-sheet{
  width:100%;
  height:auto;
  min-height:560px;
  border-radius:15px;
  border:1px solid #dbe4ef;
  box-shadow:none;
  overflow:visible;
}
.aipot-workspace-bottom-chat .aipot-result-canvas{
  height:auto;
  min-height:560px;
  overflow:visible;
  padding:12px;
}
.aipot-workspace-bottom-chat .aipot-result-hero{display:none!important}
.aipot-actions-only{justify-content:flex-end;background:transparent;border:0;padding:0;margin:0 0 9px}
.aipot-actions-only .aipot-context-actions{width:auto}
.aipot-actions-only .aipot-context-action{padding:7px 11px;border-radius:9px;background:#fff}

.aipot-workspace-bottom-chat .aipot-smart-context{
  padding:10px 13px;
  margin-bottom:10px;
  justify-content:space-between;
  background:#f8fbff;
}
.aipot-workspace-bottom-chat .aipot-smart-context span{border:0;background:transparent;padding:3px 5px;font-size:10px}
.aipot-workspace-bottom-chat .aipot-smart-context b{font-size:9px}
.aipot-workspace-bottom-chat .aipot-result-section{border:0;border-radius:0;background:transparent;box-shadow:none;margin-top:0;border-bottom:1px solid #e2e8f0}
.aipot-workspace-bottom-chat .aipot-result-section:last-of-type{border-bottom:0}
.aipot-workspace-bottom-chat .aipot-result-section-head{padding:15px 14px 7px;border-bottom:0;background:transparent}
.aipot-workspace-bottom-chat .aipot-result-section-head h4{font-size:14px;color:#10233f}
.aipot-workspace-bottom-chat .aipot-result-section-body{padding:8px 14px 16px;font-size:12px}
.aipot-workspace-bottom-chat .aipot-result-list{gap:8px}
.aipot-workspace-bottom-chat .aipot-result-list-item{border:1px solid #dbe4ef;border-radius:10px;background:#fff;padding:11px}
.aipot-workspace-bottom-chat .aipot-result-index{display:none}
.aipot-workspace-bottom-chat .aipot-result-list-item:before{content:'✓';display:inline-flex;align-items:center;justify-content:center;width:21px;height:21px;border-radius:50%;background:#0b62d4;color:#fff;font-size:11px;font-weight:800;flex:0 0 auto;margin-right:9px}
.aipot-workspace-bottom-chat .aipot-related-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.aipot-workspace-bottom-chat .aipot-related-card{min-height:105px;background:#fff;padding:14px;border-radius:11px;cursor:pointer}
.aipot-workspace-bottom-chat .aipot-related-card:hover{border-color:#93c5fd;background:#f8fbff}
.aipot-workspace-bottom-chat .aipot-sources-panel,.aipot-workspace-bottom-chat .aipot-suggested-actions{border-left:0;border-right:0;border-radius:0;background:transparent;padding:13px 14px;margin-top:0}
.aipot-workspace-bottom-chat .aipot-suggested-actions button{padding:7px 10px}

.aipot-bottom-chat{
  margin-top:12px;
  display:grid;
  grid-template-columns:58px minmax(0,1fr) 34px;
  gap:12px;
  align-items:center;
  padding:10px 12px;
  border:1.5px solid #3b82f6;
  border-radius:15px;
  background:#fff;
}
.aipot-bottom-chat-mark{width:52px;height:52px;border-radius:50%;display:grid;place-items:center;background:#074a9f;overflow:hidden}
.aipot-bottom-chat-mark img{width:100%;height:100%;object-fit:cover}
.aipot-bottom-chat-main{min-width:0}
.aipot-bottom-history{display:none!important}
.aipot-bottom-inputbar{margin:0!important;padding:0!important;border:0!important;background:transparent!important;display:grid!important;grid-template-columns:minmax(0,1fr) 52px;gap:10px;align-items:center}
.aipot-bottom-inputbar .aipot-input{min-height:46px;max-height:120px;border:0!important;background:#fff!important;padding:12px 13px!important;resize:none;font-size:13px}
.aipot-bottom-inputbar .aipot-send-btn{width:50px;height:50px;border-radius:10px;font-size:20px}
.aipot-bottom-chips{padding:3px 0 0!important;gap:5px!important}
.aipot-bottom-chips .aipot-chip{font-size:9px!important;padding:4px 8px!important;background:#f8fafc}
.aipot-bottom-clear{align-self:start;width:30px;height:30px;color:#64748b;background:#f8fafc;border:1px solid #e2e8f0}
.aipot-bottom-disclaimer{text-align:center;color:#94a3b8;font-size:9px;padding:7px 0 0}

@media(max-width:900px){
  .aipot-main-header-inner{align-items:flex-start;flex-direction:column;min-height:auto;padding:12px 14px}
  .aipot-header-nav{justify-content:flex-start}
  .aipot-workspace-bottom-chat .aipot-related-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .aipot-bottom-chat{grid-template-columns:44px minmax(0,1fr)}
  .aipot-bottom-chat-mark{width:42px;height:42px}
  .aipot-bottom-clear{display:none}
}
@media(max-width:600px){
  .aipot-brand-logo img{height:28px}.aipot-brand-copy h1{font-size:17px}.aipot-brand-divider{height:38px}
  .aipot-workspace-shell.aipot-workspace-bottom-chat{padding:8px}
  .aipot-workspace-bottom-chat .aipot-related-grid{grid-template-columns:1fr}
  .aipot-workspace-bottom-chat .aipot-smart-context{justify-content:flex-start}
  .aipot-bottom-chat{grid-template-columns:1fr;padding:9px}.aipot-bottom-chat-mark{display:none}
  .aipot-bottom-inputbar{grid-template-columns:minmax(0,1fr) 46px}.aipot-bottom-inputbar .aipot-send-btn{width:44px;height:44px}
}

/* ===== ONE v212 — AI Eagle persistent bottom composer ===== */
#aipotHubPage:not(.hidden){
  height:100vh;
  overflow:hidden;
}

.aipot-workspace-shell.aipot-workspace-bottom-chat{
  height:calc(100vh - 88px);
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.aipot-workspace-bottom-chat .aipot-result-sheet{
  flex:1 1 auto;
  min-height:0;
  height:auto;
  overflow:hidden;
}

.aipot-workspace-bottom-chat .aipot-result-canvas{
  height:100%;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  padding-bottom:18px;
}

.aipot-bottom-chat{
  flex:0 0 auto;
  margin-top:10px;
  position:relative;
  z-index:20;
  box-shadow:0 -8px 24px rgba(15, 55, 105, .08);
}

.aipot-bottom-disclaimer{
  flex:0 0 auto;
}

@media(max-width:900px){
  #aipotHubPage:not(.hidden){height:100dvh}
  .aipot-workspace-shell.aipot-workspace-bottom-chat{
    height:calc(100dvh - 132px);
  }
}

@media(max-width:600px){
  .aipot-workspace-shell.aipot-workspace-bottom-chat{
    height:calc(100dvh - 118px);
  }
  .aipot-bottom-chips{
    display:flex!important;
    overflow-x:auto;
    flex-wrap:nowrap!important;
    padding-bottom:2px!important;
  }
  .aipot-bottom-chips .aipot-chip{flex:0 0 auto}
}


/* ===== ONE v216 — AI Eagle persistent conversation workspace ===== */
.aipot-eagle-only{background:transparent!important;border-radius:0!important;padding:0!important;min-width:58px;justify-content:center}
.aipot-eagle-only img{height:54px!important;width:54px!important;object-fit:contain;filter:drop-shadow(0 2px 2px rgba(0,0,0,.12))}
.aipot-last-question{min-width:0;max-width:min(46vw,720px);margin-left:10px;padding-left:18px;border-left:1px solid rgba(255,255,255,.3)}
.aipot-last-question span{display:block;font-size:9px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:rgba(255,255,255,.68);margin-bottom:3px}
.aipot-last-question strong{display:block;font-size:13px;line-height:1.3;color:#fff;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.aipot-workspace-shell.aipot-workspace-bottom-chat{padding-bottom:112px}
.aipot-workspace-bottom-chat .aipot-result-sheet{min-height:calc(100vh - 225px);background:#f8fafc}
.aipot-workspace-bottom-chat .aipot-result-canvas{min-height:calc(100vh - 225px);padding:18px 20px 30px}
.aipot-bottom-chat{position:fixed;left:0;right:0;bottom:0;z-index:60;margin:0;border-radius:0;border-width:1px 0 0;padding:9px 16px 22px;grid-template-columns:48px minmax(0,1fr) 34px;box-shadow:0 -8px 25px rgba(15,35,65,.12)}
.aipot-bottom-chat-mark{width:42px;height:42px;border-radius:0;background:transparent;overflow:visible}
.aipot-bottom-chat-mark img{object-fit:contain}
.aipot-bottom-chat-main{display:grid;grid-template-columns:minmax(280px,1fr) auto;align-items:center;gap:12px}
.aipot-bottom-inputbar{grid-column:1;grid-row:1}
.aipot-bottom-chips{grid-column:2;grid-row:1;margin:0!important;justify-content:flex-end;flex-wrap:nowrap;overflow-x:auto;max-width:48vw;padding-bottom:1px}
.aipot-bottom-chips .aipot-chip{white-space:nowrap}
.aipot-bottom-disclaimer{position:fixed;left:62px;bottom:3px;z-index:61;font-size:9px;color:#718096;background:transparent}
.aipot-conversation{display:flex;flex-direction:column;gap:16px;max-width:1380px;margin:0 auto}
.aipot-conversation-context{position:sticky;top:100px;z-index:4;background:rgba(248,250,252,.94);backdrop-filter:blur(8px);padding-bottom:4px}
.aipot-turn{display:grid;grid-template-columns:88px minmax(0,1fr);gap:12px;align-items:start}
.aipot-turn-role{font-size:10px;font-weight:850;letter-spacing:.08em;text-transform:uppercase;padding-top:10px;color:#65758b}
.aipot-turn.user .aipot-turn-role{color:#0b5ab8}
.aipot-turn.assistant .aipot-turn-role{color:#9a6500}
.aipot-turn.system .aipot-turn-role{color:#a33a3a}
.aipot-turn-card{background:#fff;border:1px solid #dbe4ef;border-radius:13px;padding:14px 16px;box-shadow:0 2px 8px rgba(15,35,65,.04);min-width:0}
.aipot-turn.user .aipot-turn-card{background:#edf5ff;border-color:#bfd7f5}
.aipot-turn.system .aipot-turn-card{background:#fff5f5;border-color:#f2c5c5}
.aipot-turn-content{white-space:pre-wrap;font-size:13px;line-height:1.55;color:#24364d;overflow-wrap:anywhere}
.aipot-turn-meta{display:block;margin-top:8px;font-size:9px;color:#8a98aa}
.aipot-next-actions{margin-top:14px;padding-top:12px;border-top:1px solid #e5ebf2}
.aipot-next-actions>strong{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#61738b;margin-bottom:8px}
.aipot-next-actions>div{display:flex;flex-wrap:wrap;gap:7px}
.aipot-next-actions button{border:1px solid #cbd8e8;background:#f8fbff;color:#174a84;border-radius:999px;padding:7px 10px;font-size:10px;font-weight:750;cursor:pointer}
.aipot-next-actions button:hover{background:#eaf3ff;border-color:#8bb6e6}
.aipot-conversation-empty{max-width:900px;margin:54px auto;text-align:center;padding:36px}
.aipot-conversation-empty img{width:76px;height:76px;object-fit:contain;margin:0 auto 12px}
.aipot-conversation-empty h3{margin:0 0 8px;color:#142b4b}
.aipot-conversation-empty p{margin:0;color:#6b7c92}
.aipot-inline-thinking{display:flex;align-items:center;gap:10px;color:#6b7c92;font-size:12px}
@media(max-width:980px){.aipot-last-question{display:none}.aipot-bottom-chat-main{grid-template-columns:1fr}.aipot-bottom-inputbar{grid-column:1;grid-row:1}.aipot-bottom-chips{grid-column:1;grid-row:2;max-width:none;justify-content:flex-start}.aipot-workspace-shell.aipot-workspace-bottom-chat{padding-bottom:152px}.aipot-bottom-chat{padding-bottom:20px}.aipot-bottom-disclaimer{left:16px}.aipot-turn{grid-template-columns:1fr;gap:5px}.aipot-turn-role{padding-top:0}}

/* ===== ONE v217 — AI Eagle compact single-response workspace ===== */
#aipotHubPage:not(.hidden){height:100vh;overflow:hidden}
#aipotHubPage .aipot-main-header-inner{min-height:82px}
#aipotHubPage .aipot-brand-logo img{height:54px!important;width:54px!important;object-fit:contain}
#aipotHubPage .aipot-workspace-shell.aipot-workspace-bottom-chat{height:calc(100vh - 82px);padding:12px 14px 108px;overflow:hidden}
#aipotHubPage .aipot-result-sheet{height:100%;min-height:0;display:flex;flex-direction:column;border-radius:14px;overflow:hidden;background:#fff}
.aipot-question-header{flex:0 0 auto;min-height:88px;padding:14px 20px;display:flex;align-items:center;justify-content:space-between;gap:20px;background:linear-gradient(110deg,#06469a,#0b5fc8);color:#fff}
.aipot-question-header span{display:block;font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:rgba(255,255,255,.75);margin-bottom:4px}
.aipot-question-header strong{display:block;font-size:18px;line-height:1.25;max-width:1000px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.aipot-question-header small{display:block;margin-top:7px;font-size:11px;color:rgba(255,255,255,.85)}
.aipot-question-header time{font-size:11px;white-space:nowrap;color:rgba(255,255,255,.85)}
.aipot-result-layout{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 190px;gap:0;overflow:hidden}
.aipot-workspace-bottom-chat .aipot-result-canvas{height:100%;min-height:0;overflow-y:auto;padding:22px 24px 34px;background:#fff}
.aipot-actions-rail{height:100%;overflow-y:auto;border-left:1px solid #e1e8f0;background:#fbfdff;padding:16px 12px}
.aipot-actions-rail-title{font-size:12px;font-weight:850;color:#162b47;margin-bottom:10px}
#aipotHubActionRail{display:grid;gap:7px}
.aipot-rail-action{width:100%;min-height:36px;border:1px solid #cad8e8;border-radius:8px;background:#fff;color:#164f91;padding:7px 9px;text-align:left;font-size:10px;font-weight:750;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.aipot-rail-action:hover:not(:disabled){background:#edf5ff;border-color:#7eaee4}
.aipot-rail-action:disabled{cursor:not-allowed;background:#f2f4f7;border-color:#e2e6eb;color:#a2aab5;opacity:.85}
#aipotHubActionHint{margin:10px 2px 0;font-size:9px;line-height:1.4;color:#8a96a6}
.aipot-single-result{max-width:none;margin:0}
.aipot-single-result-empty{min-height:320px;display:grid;place-content:center;text-align:center;color:#718096}
.aipot-single-result-empty h3{margin:0 0 8px;color:#1a3558;font-size:17px}
.aipot-single-result-empty p{margin:0;max-width:520px;font-size:12px}
.aipot-single-answer{white-space:pre-wrap;font-size:13px;line-height:1.6;color:#22364f;overflow-wrap:anywhere}
.aipot-single-meta{margin-top:18px;padding-top:10px;border-top:1px solid #e7edf4;color:#8090a3;font-size:9px}
#aipotHubPage .aipot-bottom-chat{left:14px;right:14px;bottom:8px;border:1.5px solid #3b82f6;border-radius:14px;padding:9px 12px;grid-template-columns:52px minmax(0,1fr) 34px;background:#fff}
#aipotHubPage .aipot-bottom-chat-mark{width:44px;height:44px}
#aipotHubPage .aipot-bottom-chat-main{grid-template-columns:minmax(260px,1fr) auto}
#aipotHubPage .aipot-bottom-disclaimer{left:20px;bottom:0}
@media(max-width:900px){
 .aipot-result-layout{grid-template-columns:1fr}
 .aipot-actions-rail{display:none}
 .aipot-question-header strong{font-size:15px}
 #aipotHubPage .aipot-workspace-shell.aipot-workspace-bottom-chat{padding-bottom:148px}
}

/* ===== ONE v218 — AI Eagle corporate dynamic workspace ===== */
.hub-card-ai-eagle .hub-card-ai-eagle-icon{
  width:68px;height:68px;padding:3px;border-radius:14px;background:#fff;
  border:1px solid #d9e4f2;display:flex;align-items:center;justify-content:center;
  overflow:hidden;
}
.hub-card-ai-eagle .hub-card-ai-eagle-icon img{width:100%;height:100%;object-fit:contain;display:block}
.hub-card-ai-eagle .hub-card-label{color:#0b4ea2;font-weight:800}

.aipot-eagle-only{background:transparent!important;padding:0!important;border-radius:0!important}
.aipot-eagle-only img{height:56px!important;max-width:86px;object-fit:contain;filter:drop-shadow(0 3px 4px rgba(0,0,0,.16))}
.aipot-bottom-chat-mark{width:84px;min-width:84px;background:linear-gradient(135deg,#fff9dc,#fff);border-right:1px solid #d9e4f2}
.aipot-bottom-chat-mark img{width:72px!important;height:64px!important;object-fit:contain!important;filter:drop-shadow(0 3px 5px rgba(245,179,0,.24))}

.aipot-bottom-inputbar{
  border:2px solid #1d64d8!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 0 0 3px rgba(29,100,216,.08),0 4px 14px rgba(15,76,167,.10)!important;
  overflow:hidden;
}
.aipot-bottom-inputbar:focus-within{
  border-color:#075ee5!important;
  box-shadow:0 0 0 4px rgba(7,94,229,.14),0 7px 18px rgba(15,76,167,.15)!important;
}
.aipot-bottom-inputbar .aipot-input{min-height:54px!important;font-size:14px!important;padding:15px 16px!important;background:#fff!important}
.aipot-bottom-inputbar .aipot-send-btn{min-width:58px!important;border-radius:0!important}

.aipot-question-header{
  position:relative;overflow:hidden;
  background:linear-gradient(112deg,#073c86 0%,#0b4ea2 58%,#075fca 100%)!important;
  transition:background .35s ease,box-shadow .35s ease;
}
.aipot-question-header:after{
  content:'';position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(105deg,transparent 0%,rgba(255,255,255,.07) 46%,transparent 70%);
  transform:translateX(-100%);
}
.aipot-question-header.aipot-context-active{box-shadow:inset 5px 0 0 #20b26b}
.aipot-question-header.aipot-context-missing{box-shadow:inset 5px 0 0 #f2b800}
.aipot-question-header.aipot-processing:after{animation:aipotHeaderSweep 1.9s linear infinite}
@keyframes aipotHeaderSweep{to{transform:translateX(100%)}}

.aipot-result-canvas{position:relative;isolation:isolate}
.aipot-working-state{
  min-height:430px;display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;position:relative;overflow:hidden;padding:36px;
}
.aipot-working-eagle{
  position:absolute;width:min(46vw,560px);height:min(42vw,460px);object-fit:contain;
  opacity:.075;filter:grayscale(1) sepia(1) saturate(2.2) hue-rotate(345deg);
  animation:aipotEagleFlight 3.6s ease-in-out infinite;
}
@keyframes aipotEagleFlight{
  0%{transform:translate(-16%,12%) scale(.82) rotate(-4deg);opacity:.035}
  45%{transform:translate(3%,-3%) scale(1.02) rotate(1deg);opacity:.10}
  100%{transform:translate(18%,-11%) scale(.88) rotate(4deg);opacity:.035}
}
.aipot-working-copy{position:relative;z-index:2;max-width:760px}
.aipot-working-copy h3{margin:0;color:#0a428f;font-size:22px;font-weight:800}
.aipot-working-copy p{margin:8px 0 20px;color:#64748b;font-size:13px}
.aipot-working-pipeline{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.aipot-working-step{display:flex;align-items:center;gap:7px;padding:8px 11px;border:1px solid #dbe5f1;border-radius:999px;background:rgba(255,255,255,.88);font-size:11px;color:#64748b}
.aipot-working-step.done{color:#147a45;border-color:#b9e7cd;background:#f2fbf6}
.aipot-working-step.active{color:#0b4ea2;border-color:#9cc4f7;background:#eff6ff;font-weight:700}
.aipot-working-step .dot{width:8px;height:8px;border-radius:50%;background:#cbd5e1}
.aipot-working-step.done .dot{background:#20a765}
.aipot-working-step.active .dot{background:#0b62d4;animation:aipotPulse 1s ease-in-out infinite}
@keyframes aipotPulse{50%{transform:scale(1.55);opacity:.45}}

.aipot-single-answer{white-space:pre-wrap;line-height:1.6}
.aipot-negative-answer{border-left:4px solid #f2b800;background:#fffaf0;padding:14px 16px;border-radius:10px;color:#27364a}
.aipot-answer-footer{margin-top:18px;padding-top:12px;border-top:1px solid #e2e8f0;display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;color:#64748b;font-size:11px}
.aipot-answer-footer b{color:#334155}

@media(max-width:760px){
  .aipot-bottom-chat-mark{width:62px;min-width:62px}.aipot-bottom-chat-mark img{width:54px!important;height:50px!important}
  .aipot-working-pipeline{align-items:stretch;flex-direction:column}.aipot-working-step{justify-content:flex-start}
}


/* ===== ONE v220 — Quick Insights and official-logo flight ===== */
#aipotHubPage .aipot-actions-rail{display:flex;flex-direction:column;min-height:0}
#aipotHubPage #aiPotHubActionRail{flex:1 1 auto;align-content:start}
#aipotHubPage .aipot-actions-rail-title{font-size:13px;font-weight:850;letter-spacing:.01em;color:#102f5b;margin-bottom:11px}
#aipotHubPage .aipot-rail-action{min-height:34px;padding:6px 9px;font-size:10px}
#aipotHubPage .aipot-working-state{min-height:100%;overflow:hidden}
#aipotHubPage .aipot-working-eagle{
  width:120px;height:120px;opacity:.18;filter:none;
  left:-150px;top:36%;transform:translateY(-50%);
  animation:aipotOfficialLogoFlight 4.8s linear infinite;
  will-change:transform,opacity;
}
@keyframes aipotOfficialLogoFlight{
  0%{transform:translate3d(0,-50%,0) rotate(-3deg) scale(.92);opacity:0}
  8%{opacity:.16}
  48%{transform:translate3d(calc(50vw - 20px),calc(-50% - 34px),0) rotate(1deg) scale(1);opacity:.20}
  92%{opacity:.15}
  100%{transform:translate3d(calc(100vw + 240px),calc(-50% + 12px),0) rotate(3deg) scale(.94);opacity:0}
}
@media(max-width:760px){
  #aipotHubPage .aipot-working-eagle{width:84px;height:84px;animation-duration:4s}
}


/* ===== ONE v222 — definitive full-height workspace, isolated composer logo, live answer render ===== */
#aipotHubPage:not(.hidden){height:100vh!important;overflow:hidden!important;background:#fff!important}
#aipotHubPage .aipot-workspace-shell.aipot-workspace-bottom-chat{
  height:calc(100vh - 82px)!important;
  min-height:0!important;
  max-width:none!important;
  display:block!important;
  padding:12px 14px 108px!important;
  overflow:hidden!important;
  background:#fff!important;
}
#aipotHubPage .aipot-result-sheet{
  height:100%!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  background:#fff!important;
}
#aipotHubPage .aipot-result-layout{
  flex:1 1 auto!important;
  height:auto!important;
  min-height:0!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 205px!important;
  align-items:stretch!important;
  overflow:hidden!important;
  background:#fff!important;
}
#aipotHubPage .aipot-result-canvas{
  height:100%!important;
  min-height:0!important;
  padding:22px 24px 34px!important;
  overflow-y:auto!important;
  background:#fff!important;
  box-sizing:border-box!important;
}
#aipotHubPage .aipot-single-result,
#aipotHubPage .aipot-single-result-empty,
#aipotHubPage .aipot-working-state{
  width:100%!important;
  min-height:100%!important;
  height:auto!important;
  box-sizing:border-box!important;
  background:#fff!important;
}
#aipotHubPage .aipot-actions-rail{
  height:auto!important;
  min-height:0!important;
  align-self:stretch!important;
  overflow-y:auto!important;
  display:flex!important;
  flex-direction:column!important;
  padding:14px 10px 12px!important;
  border-left:1px solid #dbe5f1!important;
  background:#fbfdff!important;
  box-sizing:border-box!important;
}
#aipotHubPage #aiPotHubActionRail{flex:0 0 auto!important;display:flex!important;flex-direction:column!important;gap:4px!important}
#aipotHubPage #aiPotHubActionHint{margin-top:auto!important;padding-top:12px!important;border-top:1px solid #dbe5f1!important}

/* Logo is a separate column, shifted left and vertically centered; it cannot cover the textarea. */
#aipotHubPage .aipot-bottom-chat{
  grid-template-columns:72px minmax(0,1fr) 34px!important;
  align-items:center!important;
  column-gap:12px!important;
  overflow:visible!important;
}
#aipotHubPage .aipot-bottom-chat-mark{
  position:relative!important;
  left:-6px!important;
  width:66px!important;
  min-width:66px!important;
  height:58px!important;
  margin:0!important;
  padding:0 8px 0 0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  overflow:visible!important;
  border-right:1px solid #d9e4f2!important;
  border-radius:0!important;
  background:linear-gradient(135deg,#fff9dc 0%,#fff 78%)!important;
  box-sizing:border-box!important;
}
#aipotHubPage .aipot-bottom-chat-mark img{
  display:block!important;
  width:56px!important;
  height:52px!important;
  max-width:56px!important;
  object-fit:contain!important;
  transform:none!important;
}
#aipotHubPage .aipot-bottom-chat-main{
  min-width:0!important;
  width:100%!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:12px!important;
}
#aipotHubPage .aipot-bottom-inputbar{width:100%!important;min-width:0!important;margin:0!important;box-sizing:border-box!important}
#aipotHubPage .aipot-bottom-inputbar .aipot-input{
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  padding:15px 16px!important;
  line-height:1.35!important;
  align-self:center!important;
}

/* The official logo keeps flying while busy and disappears only after the result is rendered. */
#aipotHubPage .aipot-working-eagle{object-fit:contain!important;filter:none!important}

@media(max-width:980px){
  #aipotHubPage .aipot-result-layout{grid-template-columns:1fr!important}
  #aipotHubPage .aipot-actions-rail{display:none!important}
  #aipotHubPage .aipot-bottom-chat{grid-template-columns:64px minmax(0,1fr) 34px!important}
  #aipotHubPage .aipot-bottom-chat-mark{left:-3px!important;width:58px!important;min-width:58px!important}
  #aipotHubPage .aipot-bottom-chat-mark img{width:50px!important;height:46px!important}
}

/* ===== ONE v228 — AI Eagle definitive canvas, scroll and composer layout ===== */
/* One geometry source only. This block replaces the accumulated v223-v227 overrides. */
#aipotHubPage:not(.hidden){
  height:100dvh!important;
  min-height:100dvh!important;
  overflow:hidden!important;
  background:#f4f7fb!important;
}

#aipotHubPage .aipot-main-header{
  position:relative!important;
  height:82px!important;
  min-height:82px!important;
  z-index:50!important;
}

#aipotHubPage .aipot-main-header-inner{
  height:82px!important;
  min-height:82px!important;
  box-sizing:border-box!important;
}

#aipotHubPage .aipot-workspace-shell.aipot-workspace-bottom-chat{
  position:absolute!important;
  inset:82px 0 78px 0!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  max-width:none!important;
  margin:0!important;
  padding:12px 10px 8px!important;
  overflow:hidden!important;
  background:#f4f7fb!important;
  box-sizing:border-box!important;
}

#aipotHubPage .aipot-result-sheet{
  position:relative!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  border:1px solid #d7e1ee!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 2px 8px rgba(15,35,65,.04)!important;
  box-sizing:border-box!important;
}

#aipotHubPage .aipot-result-sheet::before,
#aipotHubPage .aipot-result-sheet::after,
#aipotHubPage .aipot-result-layout::before,
#aipotHubPage .aipot-result-layout::after{
  content:none!important;
  display:none!important;
}

#aipotHubPage .aipot-question-header{
  position:relative!important;
  inset:auto!important;
  flex:0 0 88px!important;
  width:100%!important;
  height:88px!important;
  min-height:88px!important;
  max-height:88px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  z-index:2!important;
}

#aipotHubPage .aipot-result-layout{
  position:relative!important;
  inset:auto!important;
  flex:1 1 0!important;
  width:100%!important;
  height:0!important;
  min-height:0!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 205px!important;
  align-items:stretch!important;
  overflow:hidden!important;
  background:#fff!important;
  box-sizing:border-box!important;
}

#aipotHubPage .aipot-result-canvas{
  position:relative!important;
  min-width:0!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
  padding:20px 24px 48px!important;
  background:#fff!important;
  box-sizing:border-box!important;
}

#aipotHubPage .aipot-result-canvas > *,
#aipotHubPage .aipot-single-result,
#aipotHubPage .aipot-working-state{
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  margin:0!important;
  background:transparent!important;
  box-sizing:border-box!important;
}

#aipotHubPage .aipot-single-result-empty{
  width:100%!important;
  min-height:100%!important;
  height:100%!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:visible!important;
  margin:0!important;
  padding:24px!important;
  background:#fff!important;
  box-sizing:border-box!important;
}

#aipotHubPage .aipot-single-answer,
#aipotHubPage .aipot-single-answer-negative{
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  white-space:pre-wrap!important;
  overflow-wrap:anywhere!important;
}

#aipotHubPage .aipot-actions-rail{
  width:205px!important;
  height:100%!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow-y:auto!important;
  padding:16px 10px 12px!important;
  border-left:1px solid #e1e8f0!important;
  background:#fbfdff!important;
  box-sizing:border-box!important;
}

#aipotHubPage #aiPotHubActionRail{
  flex:0 0 auto!important;
  display:flex!important;
  flex-direction:column!important;
  gap:4px!important;
}

#aipotHubPage #aiPotHubActionHint{
  margin-top:auto!important;
  padding-top:10px!important;
}

/* Composer: three truly separate controls. The eagle cannot enter the text field. */
#aipotHubPage .aipot-bottom-chat{
  position:fixed!important;
  left:10px!important;
  right:10px!important;
  bottom:9px!important;
  z-index:120!important;
  width:auto!important;
  height:58px!important;
  min-height:58px!important;
  margin:0!important;
  padding:0!important;
  display:grid!important;
  grid-template-columns:54px minmax(0,1fr) 34px!important;
  align-items:center!important;
  column-gap:10px!important;
  overflow:visible!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  box-sizing:border-box!important;
}

#aipotHubPage .aipot-bottom-chat-mark{
  position:relative!important;
  inset:auto!important;
  grid-column:1!important;
  width:54px!important;
  min-width:54px!important;
  max-width:54px!important;
  height:54px!important;
  margin:0!important;
  padding:5px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  border:1px solid #d7e1ee!important;
  border-radius:11px!important;
  background:#fffdf5!important;
  box-shadow:0 2px 8px rgba(15,35,65,.08)!important;
  box-sizing:border-box!important;
}

#aipotHubPage .aipot-bottom-chat-mark img{
  position:static!important;
  display:block!important;
  width:42px!important;
  min-width:42px!important;
  max-width:42px!important;
  height:42px!important;
  min-height:42px!important;
  max-height:42px!important;
  margin:0!important;
  padding:0!important;
  object-fit:contain!important;
  object-position:center!important;
  transform:none!important;
  filter:none!important;
}

#aipotHubPage .aipot-bottom-chat-main{
  position:relative!important;
  grid-column:2!important;
  width:100%!important;
  min-width:0!important;
  height:54px!important;
  display:grid!important;
  grid-template-columns:minmax(260px,1fr) auto!important;
  align-items:center!important;
  gap:10px!important;
  overflow:visible!important;
  box-sizing:border-box!important;
}

#aipotHubPage .aipot-bottom-history,
#aipotHubPage .aipot-bottom-chat-main > .aipot-error{
  display:none!important;
}

#aipotHubPage .aipot-bottom-inputbar{
  grid-column:1!important;
  grid-row:1!important;
  width:100%!important;
  min-width:0!important;
  height:54px!important;
  min-height:54px!important;
  margin:0!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 52px!important;
  overflow:hidden!important;
  border:1.5px solid #2563eb!important;
  border-radius:11px!important;
  background:#fff!important;
  box-shadow:0 2px 8px rgba(15,35,65,.08)!important;
  box-sizing:border-box!important;
}

#aipotHubPage .aipot-bottom-inputbar:focus-within{
  border-color:#075ee5!important;
  box-shadow:0 0 0 3px rgba(7,94,229,.12),0 3px 10px rgba(15,35,65,.10)!important;
}

#aipotHubPage .aipot-bottom-inputbar .aipot-input{
  position:static!important;
  width:100%!important;
  min-width:0!important;
  height:52px!important;
  min-height:52px!important;
  max-height:52px!important;
  margin:0!important;
  padding:15px 14px!important;
  border:0!important;
  outline:0!important;
  resize:none!important;
  background:#fff!important;
  box-shadow:none!important;
  line-height:1.35!important;
  box-sizing:border-box!important;
}

#aipotHubPage .aipot-bottom-inputbar .aipot-send-btn{
  position:static!important;
  width:52px!important;
  min-width:52px!important;
  height:52px!important;
  min-height:52px!important;
  margin:0!important;
  border:0!important;
  border-left:1px solid rgba(255,255,255,.22)!important;
  border-radius:0!important;
  box-sizing:border-box!important;
}

#aipotHubPage .aipot-bottom-chips{
  grid-column:2!important;
  grid-row:1!important;
  max-width:460px!important;
  margin:0!important;
  display:flex!important;
  flex-wrap:nowrap!important;
  justify-content:flex-end!important;
  gap:6px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  padding:0 1px!important;
}

#aipotHubPage .aipot-bottom-clear{
  position:relative!important;
  inset:auto!important;
  grid-column:3!important;
  width:34px!important;
  min-width:34px!important;
  height:34px!important;
  min-height:34px!important;
  margin:0!important;
  align-self:center!important;
}

#aipotHubPage .aipot-bottom-disclaimer{
  position:fixed!important;
  left:74px!important;
  bottom:0!important;
  z-index:121!important;
  margin:0!important;
  padding:0!important;
  background:transparent!important;
}

@media(max-width:1100px){
  #aipotHubPage .aipot-bottom-chips{max-width:330px!important}
}

@media(max-width:980px){
  #aipotHubPage .aipot-workspace-shell.aipot-workspace-bottom-chat{bottom:78px!important}
  #aipotHubPage .aipot-result-layout{grid-template-columns:1fr!important}
  #aipotHubPage .aipot-actions-rail{display:none!important}
  #aipotHubPage .aipot-bottom-chat-main{grid-template-columns:minmax(0,1fr)!important}
  #aipotHubPage .aipot-bottom-chips{display:none!important}
}

@media(max-width:600px){
  #aipotHubPage .aipot-bottom-chat{left:7px!important;right:7px!important;grid-template-columns:48px minmax(0,1fr) 32px!important;column-gap:7px!important}
  #aipotHubPage .aipot-bottom-chat-mark{width:48px!important;min-width:48px!important;max-width:48px!important;height:48px!important}
  #aipotHubPage .aipot-bottom-chat-mark img{width:36px!important;min-width:36px!important;max-width:36px!important;height:36px!important;min-height:36px!important;max-height:36px!important}
  #aipotHubPage .aipot-bottom-chat-main{height:50px!important}
  #aipotHubPage .aipot-bottom-inputbar{height:50px!important;min-height:50px!important;grid-template-columns:minmax(0,1fr) 48px!important}
  #aipotHubPage .aipot-bottom-inputbar .aipot-input{height:48px!important;min-height:48px!important;max-height:48px!important;padding:13px 12px!important}
  #aipotHubPage .aipot-bottom-inputbar .aipot-send-btn{width:48px!important;min-width:48px!important;height:48px!important;min-height:48px!important}
  #aipotHubPage .aipot-bottom-disclaimer{left:62px!important}
}

/* =====================================================================
   AI EAGLE v229 — CENTRAL PAGE REBUILD
   Completely isolated from legacy AI Eagle layout rules.
   ===================================================================== */
#aiPotHubPage:not(.hidden) {
  display: block !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 1000 !important;
  overflow: hidden !important;
  background: #eef2f7 !important;
}
#aiPotHubPage .ae229-page,
#aiPotHubPage .ae229-page * { box-sizing: border-box; }
#aiPotHubPage .ae229-page {
  width: 100vw !important;
  height: 100vh !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: 82px minmax(0, 1fr) !important;
  overflow: hidden !important;
  background: #eef2f7 !important;
  color: #172033 !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}
#aiPotHubPage .ae229-topbar {
  position: relative !important;
  z-index: 3 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-width: 0 !important;
  padding: 10px 22px !important;
  background: linear-gradient(100deg, #001b49 0%, #00265f 52%, #0049a7 100%) !important;
  color: #fff !important;
  box-shadow: 0 2px 9px rgba(0, 20, 55, .24) !important;
}
#aiPotHubPage .ae229-brand { display:flex !important; align-items:center !important; min-width:0 !important; gap:14px !important; }
#aiPotHubPage .ae229-brand-logo { width:68px !important; height:58px !important; flex:0 0 68px !important; display:flex !important; align-items:center !important; justify-content:center !important; overflow:hidden !important; }
#aiPotHubPage .ae229-brand-logo img { display:block !important; width:64px !important; height:54px !important; object-fit:contain !important; position:static !important; transform:none !important; margin:0 !important; }
#aiPotHubPage .ae229-brand-divider { width:1px !important; height:48px !important; background:rgba(255,255,255,.46) !important; flex:0 0 1px !important; }
#aiPotHubPage .ae229-brand-copy h1 { margin:0 !important; font-size:25px !important; line-height:1.05 !important; font-weight:800 !important; letter-spacing:-.02em !important; color:#fff !important; }
#aiPotHubPage .ae229-brand-copy h1 span { font-weight:700 !important; }
#aiPotHubPage .ae229-brand-copy p { margin:6px 0 0 !important; font-size:13px !important; line-height:1 !important; color:rgba(255,255,255,.82) !important; }
#aiPotHubPage .ae229-nav { display:flex !important; gap:10px !important; flex:0 0 auto !important; }
#aiPotHubPage .ae229-nav-btn { position:static !important; min-width:74px !important; height:36px !important; padding:0 15px !important; border:1px solid rgba(255,255,255,.18) !important; border-radius:8px !important; background:rgba(255,255,255,.12) !important; color:#fff !important; font-size:13px !important; font-weight:700 !important; cursor:pointer !important; }
#aiPotHubPage .ae229-main {
  min-height: 0 !important;
  overflow: hidden !important;
  display: grid !important;
  grid-template-rows: 74px minmax(0, 1fr) auto !important;
  gap: 12px !important;
  padding: 12px 18px 14px !important;
  background: #eef2f7 !important;
}
#aiPotHubPage .ae229-question-bar {
  min-width:0 !important;
  min-height:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:16px !important;
  padding:10px 16px !important;
  border:1px solid #d8e0eb !important;
  border-radius:8px !important;
  background:linear-gradient(90deg,#f7f9fc,#f1f5fb) !important;
  overflow:hidden !important;
}
#aiPotHubPage .ae229-question-copy { min-width:0 !important; display:grid !important; gap:3px !important; }
#aiPotHubPage .ae229-question-copy span { color:#68758a !important; font-size:11px !important; font-weight:800 !important; letter-spacing:.09em !important; text-transform:uppercase !important; }
#aiPotHubPage .ae229-question-copy strong { color:#172033 !important; font-size:17px !important; line-height:1.15 !important; white-space:nowrap !important; overflow:hidden !important; text-overflow:ellipsis !important; }
#aiPotHubPage .ae229-question-copy small { color:#66758a !important; font-size:12px !important; }
#aiPotHubPage .ae229-question-bar time { flex:0 0 auto !important; color:#66758a !important; font-size:12px !important; }
#aiPotHubPage .ae229-center {
  min-height:0 !important;
  min-width:0 !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) 255px !important;
  gap:12px !important;
  overflow:hidden !important;
  background:transparent !important;
}
#aiPotHubPage .ae229-answer-column {
  min-height:0 !important;
  min-width:0 !important;
  display:block !important;
  overflow:hidden !important;
  border:1px solid #d7dfe9 !important;
  border-radius:8px !important;
  background:#fff !important;
  box-shadow:0 1px 3px rgba(22,35,54,.05) !important;
}
#aiPotHubPage #aiPotHubResult.ae229-answer-scroll {
  width:100% !important;
  height:100% !important;
  min-height:0 !important;
  max-height:none !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  overscroll-behavior:contain !important;
  padding:18px 20px 28px !important;
  background:#fff !important;
  scrollbar-gutter:stable !important;
  position:static !important;
  display:block !important;
}
#aiPotHubPage #aiPotHubResult > * { max-width:none !important; }
#aiPotHubPage .ae229-insights {
  min-height:0 !important;
  min-width:0 !important;
  display:grid !important;
  grid-template-rows:44px minmax(0,1fr) auto !important;
  overflow:hidden !important;
  border:1px solid #d7dfe9 !important;
  border-radius:8px !important;
  background:#fff !important;
  box-shadow:0 1px 3px rgba(22,35,54,.05) !important;
}
#aiPotHubPage .ae229-insights-title { display:flex !important; align-items:center !important; padding:0 15px !important; border-bottom:1px solid #e3e8ef !important; color:#172033 !important; font-size:14px !important; font-weight:800 !important; }
#aiPotHubPage .ae229-insights-list { min-height:0 !important; overflow-y:auto !important; padding:10px !important; }
#aiPotHubPage .ae229-insights-hint { margin:0 !important; padding:10px 13px !important; border-top:1px solid #e8edf3 !important; color:#8793a5 !important; font-size:11px !important; line-height:1.35 !important; }
#aiPotHubPage .ae229-composer {
  min-width:0 !important;
  display:grid !important;
  grid-template-columns:minmax(320px,1.7fr) 58px 154px minmax(0,2.6fr) !important;
  align-items:center !important;
  gap:8px !important;
  padding:8px !important;
  border:1px solid #cfd9e6 !important;
  border-radius:10px !important;
  background:#fff !important;
  box-shadow:0 5px 18px rgba(18,39,72,.13) !important;
  position:relative !important;
  overflow:visible !important;
}
#aiPotHubPage .ae229-history { display:none !important; }
#aiPotHubPage .ae229-error { position:absolute !important; left:10px !important; bottom:100% !important; margin:0 0 6px !important; color:#b42318 !important; font-size:12px !important; }
#aiPotHubPage #aiPotHubInput.ae229-input {
  display:block !important;
  position:static !important;
  width:100% !important;
  min-width:0 !important;
  height:52px !important;
  min-height:52px !important;
  max-height:52px !important;
  margin:0 !important;
  padding:14px 15px !important;
  border:1px solid #b9c8da !important;
  border-radius:8px !important;
  background:#fff !important;
  color:#1d2939 !important;
  box-shadow:none !important;
  resize:none !important;
  overflow-y:auto !important;
  font:500 14px/1.45 Inter,ui-sans-serif,system-ui,sans-serif !important;
  transform:none !important;
}
#aiPotHubPage #aiPotHubInput.ae229-input:focus { outline:3px solid rgba(15,92,184,.15) !important; border-color:#0f5cb8 !important; outline-offset:1px !important; }
#aiPotHubPage .ae229-eagle-send {
  width:58px !important;
  min-width:58px !important;
  height:52px !important;
  padding:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  border:1px solid #d7dfe9 !important;
  border-radius:8px !important;
  background:#fff !important;
  cursor:pointer !important;
  box-shadow:none !important;
  transition:background .15s,border-color .15s,transform .15s !important;
}
#aiPotHubPage .ae229-eagle-send:hover { background:#fff9df !important; border-color:#e5b600 !important; transform:translateY(-1px) !important; }
#aiPotHubPage .ae229-eagle-send:disabled { opacity:.5 !important; cursor:wait !important; transform:none !important; }
#aiPotHubPage .ae229-eagle-send img { display:block !important; width:46px !important; height:42px !important; object-fit:contain !important; pointer-events:none !important; }
#aiPotHubPage .ae229-clear {
  width:154px !important;
  min-width:154px !important;
  height:52px !important;
  padding:0 12px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:7px !important;
  border:1px solid #d7dfe9 !important;
  border-radius:8px !important;
  background:#f7f9fc !important;
  color:#26364d !important;
  font-size:12px !important;
  font-weight:800 !important;
  line-height:1.1 !important;
  cursor:pointer !important;
}
#aiPotHubPage .ae229-clear:hover { background:#eef3f8 !important; border-color:#b9c8da !important; }
#aiPotHubPage .ae229-clear span:first-child { font-size:19px !important; line-height:1 !important; }
#aiPotHubPage .ae229-chips {
  min-width:0 !important;
  display:grid !important;
  grid-template-columns:repeat(6,minmax(88px,1fr)) !important;
  gap:8px !important;
  overflow:visible !important;
  padding:0 !important;
}
#aiPotHubPage .ae229-chips button {
  min-width:0 !important;
  width:100% !important;
  height:52px !important;
  padding:0 9px !important;
  border:1px solid #d7dfe9 !important;
  border-radius:8px !important;
  background:#f7f9fc !important;
  color:#26364d !important;
  font-size:11px !important;
  font-weight:800 !important;
  line-height:1.15 !important;
  white-space:normal !important;
  cursor:pointer !important;
}
#aiPotHubPage .ae229-chips button:hover:not(:disabled) { background:#edf4fb !important; border-color:#a9bfd8 !important; }
#aiPotHubPage .ae229-chips button:disabled { opacity:.48 !important; cursor:not-allowed !important; }
@media (max-width: 980px) {
  #aiPotHubPage .ae229-center { grid-template-columns:minmax(0,1fr) 210px !important; }
  #aiPotHubPage .ae229-composer { grid-template-columns:58px minmax(0,1fr) 48px 38px !important; }
  #aiPotHubPage .ae229-eagle-cell { width:58px !important; min-width:58px !important; }
  #aiPotHubPage .ae229-eagle-cell img { width:46px !important; height:42px !important; }
}
@media (max-width: 720px) {
  #aiPotHubPage .ae229-page { grid-template-rows:70px minmax(0,1fr) !important; }
  #aiPotHubPage .ae229-main { grid-template-rows:66px minmax(0,1fr) auto !important; padding:8px !important; gap:8px !important; }
  #aiPotHubPage .ae229-center { grid-template-columns:minmax(0,1fr) !important; }
  #aiPotHubPage .ae229-insights { display:none !important; }
  #aiPotHubPage .ae229-composer { grid-template-columns:48px minmax(0,1fr) 44px !important; gap:7px !important; padding:7px !important; }
  #aiPotHubPage .ae229-eagle-cell { width:48px !important; min-width:48px !important; }
  #aiPotHubPage .ae229-eagle-cell img { width:40px !important; height:36px !important; }
  #aiPotHubPage .ae229-clear { display:none !important; }
  #aiPotHubPage .ae229-brand-divider { display:none !important; }
  #aiPotHubPage .ae229-brand-copy h1 { font-size:18px !important; }
}

/* ONE v230 — compact single-row AI Eagle command bar */
@media (max-width: 1280px) {
  #aiPotHubPage .ae229-composer { grid-template-columns:minmax(260px,1fr) 54px 138px minmax(540px,2fr) !important; overflow-x:auto !important; }
  #aiPotHubPage .ae229-eagle-send { width:54px !important; min-width:54px !important; }
  #aiPotHubPage .ae229-clear { width:138px !important; min-width:138px !important; }
}
@media (max-width: 760px) {
  #aiPotHubPage .ae229-composer { grid-template-columns:minmax(230px,1fr) 50px 126px minmax(520px,2fr) !important; }
  #aiPotHubPage #aiPotHubInput.ae229-input,
  #aiPotHubPage .ae229-eagle-send,
  #aiPotHubPage .ae229-clear,
  #aiPotHubPage .ae229-chips button { height:48px !important; min-height:48px !important; max-height:48px !important; }
  #aiPotHubPage .ae229-eagle-send { width:50px !important; min-width:50px !important; }
  #aiPotHubPage .ae229-eagle-send img { width:40px !important; height:36px !important; }
  #aiPotHubPage .ae229-clear { width:126px !important; min-width:126px !important; }
}

/* v235 — keep the project-period warning above the fixed Planning Summary footer. */
.toast.presence-project-range-toast{bottom:96px!important;z-index:10050!important;max-width:min(520px,calc(100vw - 32px))}

/* v236 - Gantt allocation controls */
.sitelog-gantt-table{min-width:1280px!important}
.sitelog-gantt-table th:nth-child(7){width:82px}
.sitelog-gantt-table th:nth-child(8),.sitelog-gantt-table th:nth-child(9){width:118px}
.sitelog-gantt-table th:nth-child(10){width:240px}
.gantt-day-offset{width:104px!important;min-width:104px!important;padding:2px 6px!important}
.gantt-assigned-cell{white-space:normal!important;overflow:visible!important;height:auto!important;max-height:none!important}
.gantt-assigned-names{display:flex;flex-wrap:wrap;gap:3px;align-items:center;max-width:220px}
.gantt-assigned-names span{display:inline-block;padding:2px 6px;border-radius:10px;background:#e5e7eb;color:#111827;font-size:.68rem;font-weight:700;white-space:nowrap;max-width:210px;overflow:hidden;text-overflow:ellipsis}
.gantt-assigned-empty{font-size:.68rem;color:#6b7280;font-style:italic}
.gantt-delete-inline{margin-left:5px}
.dark .gantt-assigned-names span{background:#374151;color:#f9fafb}
.dark .gantt-assigned-empty{color:#9ca3af}

.gantt-assigned-names{position:relative}
.gantt-resource-name-btn{display:inline-block;padding:2px 7px;border:0;border-radius:10px;background:#e5e7eb;color:#111827;font-size:.68rem;font-weight:700;white-space:nowrap;max-width:210px;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.gantt-resource-name-btn:hover{outline:2px solid #2563eb}
.gantt-resource-popover{position:fixed;z-index:100000;display:flex;flex-direction:column;min-width:150px;padding:5px;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.18)}
.gantt-resource-popover button{padding:7px 9px;border:0;background:transparent;text-align:left;border-radius:5px;font-size:.75rem;cursor:pointer}
.gantt-resource-popover button:hover{background:#f3f4f6}
.gantt-resource-popover button.danger{color:#b91c1c}
.dark .gantt-resource-name-btn{background:#374151;color:#f9fafb}
.dark .gantt-resource-popover{background:#1f2937;border-color:#4b5563}
.dark .gantt-resource-popover button{color:#f9fafb}
.dark .gantt-resource-popover button:hover{background:#374151}
.dark .gantt-resource-popover button.danger{color:#fca5a5}
.resx-allocation-detail{display:inline-flex;align-items:center;min-height:34px;padding:6px 10px;border:1px solid #d1d5db;border-radius:6px;background:#f3f4f6;color:#374151;font-weight:600;white-space:nowrap;cursor:default}

/* v249 — mandatory allocation fields and resource-label warning */
@keyframes presenceResourceRequiredBlink{
  0%,100%{background:#fee2e2!important;color:#991b1b!important;box-shadow:0 0 0 1px #dc2626!important;}
  50%{background:#dc2626!important;color:#fff!important;box-shadow:0 0 0 3px rgba(220,38,38,.28)!important;}
}
#presenceTable .presence-resource-label-required{animation:none!important;font-weight:inherit!important;}

/* ===== v252: stronger required-resource alerts ===== */
@keyframes resourceNameRequiredStrongBlink {
  0%, 100% {
    background-color: #fee2e2 !important;
    color: #b91c1c !important;
    box-shadow: inset 0 0 0 2px #ef4444, 0 0 0 1px rgba(239,68,68,.35) !important;
    font-weight: 900 !important;
    opacity: 1;
  }
  50% {
    background-color: #ffffff !important;
    color: #111827 !important;
    box-shadow: inset 0 0 0 1px #fca5a5 !important;
    font-weight: 800 !important;
    opacity: .72;
  }
}

#presenceTable .presence-resource-name.resource-name-required-blink {
  animation: resourceNameRequiredStrongBlink .7s ease-in-out infinite !important;
  border-radius: 4px !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
}

@keyframes resourcesTabStrongRedBlink {
  0%, 100% {
    background-color: #fee2e2 !important;
    color: #b91c1c !important;
    border-color: #dc2626 !important;
    border-bottom-color: #dc2626 !important;
    box-shadow: inset 0 -3px 0 #dc2626, 0 0 0 1px rgba(220,38,38,.28) !important;
    opacity: 1;
  }
  50% {
    background-color: #ffffff !important;
    color: #ef4444 !important;
    border-color: #f87171 !important;
    border-bottom-color: #ef4444 !important;
    box-shadow: inset 0 -3px 0 #ef4444 !important;
    opacity: .72;
  }
}

.sitelog-tabs-zone .nav-tab-sitelog[data-slview="resources"].resources-attention,
.nav-tab-sitelog[data-slview="resources"].resources-attention,
.nav-tab-sitelog[data-slview="resources"].resources-attention.active {
  animation: resourcesTabStrongRedBlink .7s ease-in-out infinite !important;
  color: #dc2626 !important;
  border: 1px solid #dc2626 !important;
  border-bottom: 3px solid #dc2626 !important;
  font-weight: 900 !important;
}

.dark #presenceTable .presence-resource-name.resource-name-required-blink {
  animation-name: resourceNameRequiredStrongBlink !important;
}


/* ===== v253 final required-field alerts ===== */
/* Presence Planning resource names are always uppercase and bold. */
#presenceTable .presence-label-cell .presence-resource-name {
  text-transform: uppercase !important;
  font-weight: 800 !important;
}
/* Incomplete resource: blink the whole resource cell exactly like required cells. */
#presenceTable .presence-label-cell.resource-name-required-blink {
  animation: resourceAttentionPulse 1s ease-in-out infinite !important;
}
#presenceTable .presence-label-cell.resource-name-required-blink .presence-resource-name {
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
  border-color: transparent !important;
}
/* Resources tab: blinking red background, not only text/border. */
.nav-tab-sitelog.resources-attention,
.nav-tab-sitelog.resources-attention.active {
  animation: resourcesTabRedBackground 1s ease-in-out infinite !important;
  font-weight: 800 !important;
}
@keyframes resourcesTabRedBackground {
  0%,100% { background-color:#ef4444 !important; color:#ffffff !important; }
  50% { background-color:#fecaca !important; color:#991b1b !important; }
}


/* ===== v254: definitive Resources tab and Presence resource-cell alerts ===== */
@keyframes v254ResourcesTabBackgroundBlink {
  0%, 100% {
    background: #dc2626 !important;
    color: #ffffff !important;
  }
  50% {
    background: #fca5a5 !important;
    color: #7f1d1d !important;
  }
}

.sitelog-tabs-zone .nav-tab-sitelog[data-slview="resources"].resources-attention,
.sitelog-tabs-zone .nav-tab-sitelog[data-slview="resources"].resources-attention.active,
.nav-tab-sitelog[data-slview="resources"].resources-attention,
.nav-tab-sitelog[data-slview="resources"].resources-attention.active {
  animation: v254ResourcesTabBackgroundBlink .8s ease-in-out infinite !important;
  border-color: #991b1b !important;
  box-shadow: none !important;
  font-weight: 900 !important;
}

@keyframes v254PresenceResourceCellBlink {
  0%, 100% {
    background: #dc2626 !important;
    color: #ffffff !important;
  }
  50% {
    background: #fecaca !important;
    color: #7f1d1d !important;
  }
}

#presenceTable td.presence-label-cell.resource-name-required-blink {
  animation: v254PresenceResourceCellBlink .8s ease-in-out infinite !important;
  box-shadow: none !important;
}

#presenceTable td.presence-label-cell.resource-name-required-blink .presence-resource-editor,
#presenceTable td.presence-label-cell.resource-name-required-blink .presence-resource-name {
  background: transparent !important;
  color: inherit !important;
}
