    *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
    body { font-family: 'Libre Franklin', 'Franklin Gothic Medium', 'Arial Narrow', sans-serif; background: #f0f2f5; color: #18243f; overflow-x: hidden; }

    /* ── HEADER ─────────────────────────────────────── */
    .header {
      position: fixed; top: 0; left: 0; right: 0; z-index: 1100;
      height: 58px; background: #00468b; overflow: hidden;
      display: flex; align-items: center; padding: 0 20px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    }

    /* ── WILSON 66° BRAND ELEMENT ───────────────────── */
    .header::after {
      content: ''; position: absolute; right: -8px; top: -30px;
      width: 52px; height: 180%; pointer-events: none; z-index: 0;
      background: rgba(241,90,41,0.30);
      transform: rotate(-24deg);
    }
    .header::before {
      content: ''; position: absolute; right: 52px; top: -30px;
      width: 26px; height: 180%; pointer-events: none; z-index: 0;
      background: rgba(241,90,41,0.18);
      transform: rotate(-24deg);
    }
    .header-bnsf {
      font-size: 20px; font-weight: 800; letter-spacing: 2px; color: #fff;
      border-right: 1px solid rgba(255,255,255,0.35);
      padding-right: 16px; margin-right: 16px;
    }
    .header-title { font-size: 15px; font-weight: 500; color: #fff; flex: 1; }
    .header-subtitle { font-size: 11px; color: rgba(255,255,255,0.75); margin-top: 1px; }
    .header-right { display: flex; align-items: center; gap: 16px; }
    .header-user { font-size: 12px; color: rgba(255,255,255,0.9); }
    .header-firm {
      background: rgba(255,255,255,0.2); color: #fff;
      font-size: 11px; font-weight: 600; padding: 4px 10px;
      border-radius: 4px; letter-spacing: 0.5px;
    }
    .header-alert {
      background: #8b0e04; color: #fff;
      font-size: 11px; font-weight: 700; padding: 4px 10px;
      border-radius: 20px; display: flex; align-items: center; gap: 5px;
    }

    /* ── SIDEBAR ─────────────────────────────────────── */
    .sidebar {
      position: fixed; top: 58px; left: 0; bottom: 0; width: 215px;
      background: #18243f; z-index: 1000;
      display: flex; flex-direction: column; overflow-y: auto;
    }
    .nav-section {
      padding: 18px 18px 4px;
      font-size: 9.5px; font-weight: 700; letter-spacing: 1.3px;
      color: rgba(255,255,255,0.3); text-transform: uppercase;
    }
    .nav-group-header {
      padding: 14px 18px 8px;
      font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
      color: #fff; text-transform: uppercase;
      background: rgba(255,255,255,0.06);
      border-top: 1px solid rgba(255,255,255,0.1);
      margin-top: 6px;
      display: flex; align-items: center; gap: 8px;
    }
    .nav-group-header i { font-size: 12px; color: #f15a29; }
    .nav-group-header:first-of-type { border-top: none; margin-top: 0; }
    .nav-item {
      display: flex; align-items: center; gap: 10px;
      padding: 9px 18px; color: rgba(255,255,255,0.6);
      font-size: 13px; cursor: pointer; transition: all 0.15s;
      text-decoration: none; border-left: 3px solid transparent;
    }
    .nav-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.9); }
    .nav-item.active {
      background: rgba(244,121,32,0.18); color: #f15a29;
      border-left-color: #f15a29; font-weight: 600;
    }
    .nav-item i { width: 15px; text-align: center; font-size: 13px; }
    .nav-badge {
      margin-left: auto; background: #8b0e04; color: #fff;
      font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 10px;
    }
    .nav-badge.amber { background: #f15a29; }
    .sidebar-footer {
      margin-top: auto; padding: 14px 18px;
      border-top: 1px solid rgba(255,255,255,0.08);
      font-size: 10px; color: rgba(255,255,255,0.28); line-height: 1.6;
    }

    /* ── MAIN ─────────────────────────────────────── */
    .main { margin-left: 215px; margin-top: 58px; padding: 22px; }

    /* ── PAGE HEADER ─────────────────────────────────────── */
    .page-header {
      display: flex; align-items: flex-start;
      justify-content: space-between; margin-bottom: 16px;
    }
    .page-title { font-size: 21px; font-weight: 700; color: #18243f; }
    .page-meta { font-size: 12px; color: #5e6268; margin-top: 3px; }
    .page-actions { display: flex; gap: 8px; }
    .btn {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 7px 14px; border-radius: 6px; font-size: 12.5px;
      font-weight: 500; cursor: pointer; border: none; font-family: inherit;
    }
    .btn-primary { background: #f15a29; color: #fff; }
    .btn-secondary { background: #fff; color: #18243f; border: 1px solid #dce1e7; }
    .btn-secondary:hover { background: #f8f9fa; }

    /* ── FILTER BAR ─────────────────────────────────────── */
    .filter-bar { display: flex; gap: 8px; margin-bottom: 16px; align-items: center; }
    .filter-select, .filter-input {
      padding: 6px 11px; border: 1px solid #dce1e7;
      border-radius: 6px; font-size: 12.5px; color: #18243f;
      background: #fff; font-family: inherit;
    }
    .filter-input { flex: 1; }

    /* ── KPI GRID ─────────────────────────────────────── */
    .kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 16px; }
    .kpi-card {
      background: #fff; border-radius: 10px;
      padding: 12px 16px; position: relative; overflow: hidden;
      box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    }
    .kpi-card::after {
      content: ''; position: absolute;
      top: 0; left: 0; right: 0; height: 3px;
    }
    .kpi-card.orange::after { background: #f15a29; }
    .kpi-card.red::after    { background: #8b0e04; }
    .kpi-card.blue::after   { background: #00468b; }
    .kpi-card.green::after  { background: #006227; }
    .kpi-card.amber::after  { background: #f15a29; }

    .kpi-label { font-size: 11px; font-weight: 600; color: #5e6268; text-transform: uppercase; letter-spacing: 0.5px; padding-right: 44px; }
    .kpi-value { font-size: 26px; font-weight: 800; color: #18243f; margin: 4px 0 2px; line-height: 1; }
    .kpi-sub { font-size: 11px; color: #a6abb6; }
    .kpi-sub.up   { color: #006227; }
    .kpi-sub.down { color: #8b0e04; }
    .kpi-icon {
      position: absolute; top: 16px; right: 16px;
      width: 36px; height: 36px; border-radius: 8px;
      display: flex; align-items: center; justify-content: center; font-size: 16px;
    }
    .kpi-card.orange .kpi-icon { background: rgba(244,121,32,0.1); color: #f15a29; }
    .kpi-card.red .kpi-icon    { background: rgba(231,76,60,0.1);  color: #8b0e04; }
    .kpi-card.blue .kpi-icon   { background: rgba(41,128,185,0.1); color: #00468b; }
    .kpi-card.green .kpi-icon  { background: rgba(39,174,96,0.1);  color: #006227; }
    .kpi-card.amber .kpi-icon  { background: rgba(230,126,34,0.1); color: #f15a29; }

    /* ── CONTENT GRID ─────────────────────────────────────── */
    .row2 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-bottom: 14px; }
    .row3 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }

    /* ── CARD ─────────────────────────────────────── */
    .card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); overflow: hidden; }
    .card-header {
      padding: 14px 20px; border-bottom: 1px solid #f0f2f5;
      display: flex; align-items: center; justify-content: space-between;
    }
    .card-title { font-size: 14px; font-weight: 700; color: #18243f; }
    .card-subtitle { font-size: 11px; color: #5e6268; margin-top: 2px; }
    .card-body { padding: 16px 20px; }

    /* ── MAP ─────────────────────────────────────── */
    #map { height: 520px; width: 100%; }
    .map-legend {
      display: flex; gap: 18px; flex-wrap: wrap;
      padding: 10px 18px; border-top: 1px solid #f0f2f5;
    }
    .legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #555; }
    .legend-dot { width: 11px; height: 11px; border-radius: 50%; }

    /* ── STATUS DONUT ─────────────────────────────────────── */
    .donut-wrap { position: relative; height: 200px; width: 200px; margin: 4px auto 12px; }
    .donut-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 4px; }
    .donut-stat { display: flex; align-items: center; gap: 7px; font-size: 12px; }
    .d-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
    .d-label { color: #5e6268; }
    .d-val { font-weight: 700; color: #18243f; margin-left: auto; }

    /* ── TERRITORY CHART ─────────────────────────────────────── */
    .chart-wrap { position: relative; height: 270px; }

    /* ── TABLE ─────────────────────────────────────── */
    .data-table { width:100%; border-collapse:collapse; }
    .data-table th { text-align:left; font-size:11px; font-weight:700; color:#5e6268; text-transform:uppercase; letter-spacing:0.5px; padding:10px 14px; border-bottom:2px solid #f0f2f5; background:#fafbfc; white-space:nowrap; }
    .data-table td { padding:11px 14px; border-bottom:1px solid #f8f9fa; vertical-align:middle; font-size:12.5px; color:#18243f; }
    .data-table tr:hover td { background:#fafbfc; cursor:pointer; }
    /* ── FAQ ── */
    .faq-item { border-bottom:1px solid #f0f2f5; }
    .faq-q { list-style:none; padding:14px 18px; font-size:13.5px; font-weight:700; color:#18243f; cursor:pointer; display:flex; align-items:center; justify-content:space-between; gap:12px; user-select:none; }
    .faq-q::-webkit-details-marker { display:none; }
    .faq-q::after { content:'\f078'; font-family:'Font Awesome 6 Free'; font-weight:900; font-size:11px; color:#a6abb6; flex-shrink:0; transition:transform 0.2s; }
    details[open] .faq-q::after { transform:rotate(180deg); color:#00468b; }
    details[open] .faq-q { color:#00468b; }
    .faq-a { padding:0 18px 16px; font-size:13px; color:#5e6268; line-height:1.65; }
    .tbl { width: 100%; border-collapse: collapse; }
    .tbl th {
      text-align: left; font-size: 10.5px; font-weight: 700;
      color: #5e6268; text-transform: uppercase; letter-spacing: 0.5px;
      padding: 8px 14px; border-bottom: 1px solid #f0f2f5; background: #fafbfc;
    }
    .tbl td { padding: 10px 14px; font-size: 12.5px; border-bottom: 1px solid #f8f9fa; vertical-align: middle; }
    .tbl tr:last-child td { border-bottom: none; }
    .tbl tr:hover td { background: #fafbfc; }

    .badge {
      display: inline-flex; align-items: center; gap: 4px;
      padding: 3px 8px; border-radius: 12px;
      font-size: 11px; font-weight: 600;
    }
    .badge.on-track    { background: rgba(39,174,96,0.1);  color: #006227; }
    .badge.attention   { background: rgba(230,126,34,0.1); color: #f15a29; }
    .badge.at-risk     { background: rgba(231,76,60,0.1);  color: #8b0e04; }
    .badge.construction{ background: rgba(41,128,185,0.1); color: #00468b; }
    .badge.completed   { background: rgba(0,0,0,0.08); color: #000000; }

    .age { display: inline-block; padding: 2px 7px; border-radius: 10px; font-size: 11px; font-weight: 700; }
    .age.g { background: rgba(39,174,96,0.1);  color: #006227; }
    .age.y { background: rgba(230,126,34,0.1); color: #f15a29; }
    .age.r { background: rgba(231,76,60,0.1);  color: #8b0e04; }

    /* ── MILESTONES ─────────────────────────────────────── */
    .milestone-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 36px; }
    .milestone {
      display: flex; gap: 12px; padding: 11px 0;
      border-bottom: 1px solid #f5f6fa; align-items: flex-start;
    }
    .milestone:last-child { border-bottom: none; }
    .ms-date { text-align: center; min-width: 40px; }
    .ms-day { font-size: 22px; font-weight: 800; color: #18243f; line-height: 1; }
    .ms-mon { font-size: 10px; color: #5e6268; text-transform: uppercase; }
    .ms-title { font-size: 13px; font-weight: 500; color: #18243f; line-height: 1.35; }
    .ms-meta  { font-size: 11px; color: #5e6268; margin-top: 3px; }
    .ms-type  {
      display: inline-block; margin-top: 4px;
      font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px;
      background: rgba(244,121,32,0.1); color: #f15a29;
    }

    /* ── PAGE PANELS ─────────────────────────────────────── */
    .page-panel { display: block; }

    /* ── CROSSING ID PILL ─────────────────────────────────────── */
    .crossing-id {
      font-size: 11px; font-weight: 700; font-family: 'Courier New', monospace;
      background: rgba(24,36,63,0.09); color: #18243f;
      padding: 2px 7px; border-radius: 4px; letter-spacing: 0.5px;
    }

    /* ── MODAL ─────────────────────────────────────── */
    .modal-overlay {
      display: none; position: fixed; inset: 0; z-index: 2000;
      background: rgba(0,0,0,0.5); align-items: center; justify-content: center;
    }
    .modal-overlay.open { display: flex; }
    .modal {
      background: #fff; border-radius: 12px; width: 680px; max-width: 95vw;
      max-height: 85vh; overflow-y: auto;
      box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: modalIn 0.18s ease;
    }
    @keyframes modalIn { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }
    .modal-header {
      padding: 20px 24px 14px; border-bottom: 1px solid #f0f2f5;
      display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    }
    .modal-close {
      background: none; border: none; font-size: 20px; color: #a6abb6;
      cursor: pointer; padding: 0; line-height: 1; flex-shrink: 0;
    }
    .modal-close:hover { color: #18243f; }
    .modal-body { padding: 20px 24px; }
    .modal-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; margin-bottom: 16px; }
    .modal-field { }
    .modal-field label { font-size: 10.5px; font-weight: 700; color: #5e6268; text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-bottom: 3px; }
    .modal-field .val { font-size: 13px; font-weight: 500; color: #18243f; }
    .modal-section { margin-top: 16px; padding-top: 14px; border-top: 1px solid #f0f2f5; }
    .modal-section-title { font-size: 11px; font-weight: 700; color: #5e6268; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
    .timeline-item { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f8f9fa; font-size: 12px; }
    .timeline-item:last-child { border-bottom: none; }
    .tl-date { color: #5e6268; min-width: 80px; }
    .tl-event { color: #18243f; flex: 1; }

    /* ── ALL PROJECTS TABLE ─────────────────────────────────────── */
    .projects-table-wrap { overflow-x: auto; }
    .projects-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
    .projects-tbl th {
      text-align: left; font-size: 10.5px; font-weight: 700;
      color: #5e6268; text-transform: uppercase; letter-spacing: 0.5px;
      padding: 8px 14px; border-bottom: 2px solid #f0f2f5; background: #fafbfc;
      white-space: nowrap; position: sticky; top: 0;
    }
    .projects-tbl td { padding: 9px 14px; border-bottom: 1px solid #f8f9fa; vertical-align: middle; }
    .projects-tbl tr:hover td { background: #fafbfc; cursor: pointer; }
    .projects-tbl tr.row-hidden { display: none; }
    .proj-name { font-weight: 600; color: #18243f; }
    .proj-agency { font-size: 11px; color: #5e6268; margin-top: 2px; }

    /* ── HOW TO USE PAGE ─────────────────────────────────────── */
    .howto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
    .howto-step {
      display: flex; gap: 14px; padding: 14px 0;
      border-bottom: 1px solid #f0f2f5; align-items: flex-start;
    }
    .howto-step:last-child { border-bottom: none; }
    .howto-num {
      width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
      background: #f15a29; color: #fff; display: flex; align-items: center;
      justify-content: center; font-size: 14px; font-weight: 800;
    }
    .howto-step-title { font-size: 13px; font-weight: 600; color: #18243f; }
    .howto-step-desc { font-size: 12px; color: #555; margin-top: 3px; line-height: 1.55; }
    .status-def { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f5f6fa; }
    .status-def:last-child { border-bottom: none; }
    .status-def-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; }
    .status-def-title { font-size: 13px; font-weight: 600; color: #18243f; }
    .status-def-desc { font-size: 12px; color: #555; margin-top: 2px; line-height: 1.5; }
    .territory-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f5f6fa; }
    .territory-row:last-child { border-bottom: none; }
    .territory-initials {
      width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
      background: #f15a29; color: #fff; font-size: 13px; font-weight: 800;
      display: flex; align-items: center; justify-content: center;
    }
    .territory-name { font-size: 13px; font-weight: 600; color: #18243f; }
    .territory-meta { font-size: 11px; color: #5e6268; margin-top: 1px; }
    .glossary-term { padding: 10px 0; border-bottom: 1px solid #f5f6fa; }
    .glossary-term:last-child { border-bottom: none; }
    .glossary-term dt { font-size: 13px; font-weight: 600; color: #18243f; }
    .glossary-term dd { font-size: 12px; color: #555; margin: 3px 0 0; line-height: 1.5; }

    /* ── MOBILE RESPONSIVE ─────────────────────────────────────── */
    @media (max-width: 768px) {
      #hamburger { display: block !important; }
      .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; z-index: 200; }
      .sidebar.open { transform: translateX(0); }
      /* Dim backdrop when sidebar open */
      .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 199; }
      .sidebar.open ~ .sidebar-backdrop { display: block; }
      .main { margin-left: 0 !important; padding: 12px; }
      /* KPI grids — override inline styles too */
      .kpi-grid,
      #flag-kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }
      .row2, .row3 { grid-template-columns: 1fr !important; }
      .milestone-grid { grid-template-columns: 1fr !important; }
      .page-header { flex-direction: column; gap: 10px; }
      .page-actions { flex-wrap: wrap; }
      .header-user { display: none; }
      .header-subtitle { display: none; }
      #fusion-badge { display: none; }
      .header-alert { display: none; }
      /* Tables — all scrollable */
      .gantt-wrap,
      .flag-tbl-wrap,
      .flag-table-wrap,
      .data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
      table.flag-tbl,
      table.data-table { min-width: 600px; }
      /* Maps — comfortable height on mobile */
      #flag-map, #map { height: 280px !important; }
      /* Modals */
      .howto-grid { grid-template-columns: 1fr !important; }
      .modal { width: 95vw !important; max-height: 92vh; }
      .modal-field-grid { grid-template-columns: 1fr !important; }
      .form-row, .form-row-3 { grid-template-columns: 1fr !important; }
      /* RWIC strip horizontal scroll */
      .flag-rwic-strip { overflow-x: auto; -webkit-overflow-scrolling: touch; }
      /* Filter bars wrap */
      .filter-bar { flex-wrap: wrap; gap: 6px; }
      #demo-controls { min-width: unset; width: 90vw; flex-wrap: wrap; }
      /* Flag role switcher */
      .flag-role-switcher { flex-wrap: wrap; gap: 4px; }
      /* Touch targets — map overlay buttons */
      #flag-rail-lines-btn, #flag-territory-btn, #flag-weather-btn {
        min-height: 38px; padding: 6px 13px; font-size: 12.5px;
        touch-action: manipulation;
      }
      /* Touch targets — nav items */
      .nav-item { min-height: 40px; }
      /* Kill 300ms tap delay on interactive elements */
      button, .nav-item, .flag-tbl tr, .data-table tr { touch-action: manipulation; }
      /* Copy link button — prominent on mobile */
      #fd-copy-link-btn { min-height: 36px; }
      /* Ensure map buttons wrap cleanly on narrow screens */
      .card-header > div:last-child { flex-wrap: wrap; }
    }
    @media (max-width: 480px) {
      .kpi-grid,
      #flag-kpi-grid { grid-template-columns: 1fr !important; }
      .filter-bar { flex-wrap: wrap; }
      .header-right { gap: 6px; }
      .page-title { font-size: 16px !important; }
      .kpi-value { font-size: 22px !important; }
      /* Single column on very small screens */
      .flag-map-legend { flex-wrap: wrap; gap: 6px; }
    }

    /* ── QZ FILTER ACTIVE ─────────────────────────────────────── */
    .btn.qz-active { background: rgba(39,174,96,0.15) !important; color: #006227 !important; border: 1px solid #006227; }

    /* ── AGREEMENT TRACKER ─────────────────────────────────────── */
    .agr-step { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; min-width: 80px; }
    .agr-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #dce1e7; background: #fff; }
    .agr-step.done .agr-dot  { background: #006227; border-color: #006227; }
    .agr-step.curr .agr-dot  { background: #f15a29; border-color: #f15a29; width: 16px; height: 16px; box-shadow: 0 0 0 3px rgba(244,121,32,0.18); }
    .agr-lbl { font-size: 9px; color: #bbb; margin-top: 5px; text-align: center; line-height: 1.3; max-width: 76px; }
    .agr-step.done .agr-lbl { color: #006227; }
    .agr-step.curr .agr-lbl { color: #f15a29; font-weight: 700; font-size: 10px; }
    .agr-conn { flex: 1; height: 2px; background: #dce1e7; margin-top: 5px; min-width: 12px; align-self: flex-start; margin-top: 10px; }
    .agr-conn.done { background: #006227; }

    /* ── KANBAN BOARD ────────────────────────────────────────── */
    .kanban-wrap { overflow-x: auto; display: flex; gap: 10px; padding-bottom: 12px; align-items: flex-start; }
    .kanban-col { min-width: 180px; flex-shrink: 0; background: #f4f5f8; border-radius: 10px; }
    .kanban-col-hdr { padding: 10px 11px 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #18243f; border-bottom: 1px solid #e0e3e9; display: flex; align-items: center; justify-content: space-between; }
    .kanban-col-count { background: #18243f; color: #fff; font-size: 9px; font-weight: 800; padding: 1px 6px; border-radius: 10px; }
    .kanban-cards { padding: 7px; min-height: 60px; }
    .kanban-empty { font-size: 10.5px; color: #bbb; text-align: center; padding: 14px 4px; }
    .kanban-card { background: #fff; border-radius: 7px; padding: 9px 10px; margin-bottom: 7px; cursor: pointer; transition: box-shadow 0.15s, transform 0.15s; border-left: 3px solid #dce1e7; box-shadow: 0 1px 3px rgba(0,0,0,0.07); }
    .kanban-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.12); transform: translateY(-1px); }
    .kanban-card.s-on-track { border-left-color: #006227; }
    .kanban-card.s-at-risk { border-left-color: #8b0e04; }
    .kanban-card.s-attention { border-left-color: #f15a29; }
    .kanban-card.s-construction { border-left-color: #00468b; }
    .kanban-card.s-completed { border-left-color: #000000; }
    .kanban-card-id { font-size: 9.5px; color: #bbb; font-family: monospace; margin-bottom: 2px; }
    .kanban-card-name { font-size: 11.5px; font-weight: 600; color: #18243f; line-height: 1.35; margin-bottom: 4px; }
    .kanban-card-meta { font-size: 10px; color: #5e6268; display: flex; justify-content: space-between; align-items: center; }

    /* ── ACTION ITEMS ────────────────────────────────────────── */
    .action-tbl { width: 100%; border-collapse: collapse; }
    .action-tbl th { text-align: left; padding: 9px 12px; background: #fafbfc; border-bottom: 2px solid #f0f2f5; font-size: 10.5px; font-weight: 700; color: #5e6268; text-transform: uppercase; letter-spacing: 0.4px; white-space: nowrap; }
    .action-tbl td { padding: 9px 12px; border-bottom: 1px solid #f8f9fa; vertical-align: middle; font-size: 12px; }
    .action-tbl tr.row-done td { opacity: 0.35; pointer-events: none; }
    .action-tbl tr:not(.row-done):hover td { background: #fafbfc; }
    .pri-high { display: inline-block; background: #fdecea; color: #8b0e04; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
    .pri-med  { display: inline-block; background: #fff3e0; color: #f15a29; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
    .pri-low  { display: inline-block; background: #e8f8ef; color: #006227; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
    .action-days { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 8px; }
    .action-days.overdue { background: #fdecea; color: #8b0e04; }
    .action-days.soon    { background: #fff3e0; color: #f15a29; }
    .action-days.ok      { background: #e8f8ef; color: #006227; }
    .complete-btn { background: none; border: 1px solid #dce1e7; color: #5e6268; font-size: 10.5px; padding: 3px 10px; border-radius: 5px; cursor: pointer; white-space: nowrap; }
    .complete-btn:hover { background: #006227; color: #fff; border-color: #006227; }
    .actions-summary { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
    .actions-kpi { background: #fff; border-radius: 10px; padding: 14px 18px; flex: 1; min-width: 100px; box-shadow: 0 1px 4px rgba(0,0,0,0.07); }
    .actions-kpi-num { font-size: 26px; font-weight: 800; color: #18243f; line-height: 1; }
    .actions-kpi-lbl { font-size: 10px; color: #5e6268; text-transform: uppercase; letter-spacing: 0.4px; margin-top: 3px; }

    /* ── CALENDAR ────────────────────────────────────────── */
    .cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
    .cal-month-title { font-size: 18px; font-weight: 700; color: #18243f; }
    .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border: 1px solid #f0f2f5; }
    .cal-dow { padding: 9px 4px; text-align: center; font-size: 10px; font-weight: 700; color: #5e6268; text-transform: uppercase; letter-spacing: 0.5px; background: #fafbfc; border-bottom: 1px solid #f0f2f5; }
    .cal-cell { min-height: 88px; padding: 5px 4px; border-right: 1px solid #f5f6fa; border-bottom: 1px solid #f5f6fa; }
    .cal-cell:nth-child(7n+8) { border-right: none; }
    .cal-cell.other-month .cal-dn { color: #d0d3d8; }
    .cal-cell.today { background: rgba(244,121,32,0.04); }
    .cal-dn { font-size: 11.5px; font-weight: 600; color: #18243f; margin-bottom: 3px; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; }
    .cal-cell.today .cal-dn { background: #f15a29; color: #fff; }
    .cal-ev { font-size: 9px; font-weight: 600; padding: 2px 4px; border-radius: 3px; margin-bottom: 2px; line-height: 1.3; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
    .cal-ev.ev-m { background: #e8f0fe; color: #00468b; }
    .cal-ev.ev-d { background: #fdecea; color: #8b0e04; }
    .cal-ev.ev-c { background: #e8f8ef; color: #1e8449; }
    .cal-ev.ev-g { background: #fff3e0; color: #f15a29; }
    .cal-ev.ev-done { background: rgba(39,174,96,0.08); color: #006227; text-decoration: line-through; opacity: 0.8; }
    .cal-ev.ev-m:not(.ev-done):hover { outline: 1.5px solid #00468b; cursor: pointer; }
    .cal-ev.ev-done:hover { opacity: 1; cursor: pointer; }
    .cal-filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
    .cal-filter-bar label { font-size: 12px; font-weight: 600; color: #5e6268; white-space: nowrap; }
    .cal-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
    .cal-legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #555; }
    .cal-legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

    /* ── WILSON TEAM DASHBOARD ────────────────────────────────────────── */
    .team-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
    .team-card { background: #fff; border-radius: 12px; padding: 18px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-top: 3px solid #f15a29; }
    .team-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #f15a29 0%, #d4651b 100%); color: #fff; font-size: 16px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 9px; }
    .team-name { font-size: 14px; font-weight: 700; color: #18243f; }
    .team-role { font-size: 10.5px; color: #5e6268; margin-top: 2px; margin-bottom: 10px; line-height: 1.4; }
    .team-stats { display: flex; gap: 6px; margin-bottom: 9px; }
    .team-stat { flex: 1; text-align: center; background: #f8f9fa; border-radius: 6px; padding: 6px 2px; }
    .team-stat-n { font-size: 17px; font-weight: 800; color: #18243f; line-height: 1; }
    .team-stat-l { font-size: 8.5px; color: #5e6268; text-transform: uppercase; letter-spacing: 0.3px; margin-top: 2px; }
    .team-tag { display: inline-block; background: rgba(244,121,32,0.1); color: #d4651b; font-size: 9.5px; font-weight: 600; padding: 2px 7px; border-radius: 10px; margin: 1px; }
    .team-wl-bar { height: 5px; background: #f0f2f5; border-radius: 3px; margin-top: 10px; overflow: hidden; }
    .team-wl-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, #006227, #f15a29); }
    .team-wl-lbl { font-size: 9.5px; color: #5e6268; display: flex; justify-content: space-between; margin-top: 3px; }
    .team-supp-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
    .team-supp-card { background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 1px 5px rgba(0,0,0,0.06); }
    .team-supp-title { font-size: 12px; font-weight: 700; color: #18243f; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
    .team-supp-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid #f5f6fa; font-size: 12px; color: #555; }
    .team-supp-row:last-child { border-bottom: none; }
    .team-supp-val { font-weight: 700; color: #18243f; }

    /* ── NOTIFICATION BELL ─────────────────────────────────────── */
    .notif-bell-wrap { position: relative; }
    .notif-bell {
      width: 34px; height: 34px; border-radius: 50%;
      background: rgba(255,255,255,0.15); color: #fff;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; font-size: 14px; position: relative; transition: background 0.15s;
    }
    .notif-bell:hover { background: rgba(255,255,255,0.28); }
    .notif-badge {
      position: absolute; top: -2px; right: -2px;
      background: #8b0e04; color: #fff; font-size: 9px; font-weight: 800;
      width: 16px; height: 16px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      border: 2px solid #f15a29;
    }
    .notif-dropdown {
      display: none; position: absolute; top: 44px; right: -10px;
      width: 340px; background: #fff; border-radius: 10px;
      box-shadow: 0 12px 40px rgba(0,0,0,0.22); z-index: 1200; overflow: hidden;
    }
    .notif-dropdown.open { display: block; animation: modalIn 0.15s ease; }
    .notif-hdr {
      padding: 11px 16px; font-size: 12px; font-weight: 700; color: #18243f;
      border-bottom: 1px solid #f0f2f5; background: #fafbfc;
      display: flex; align-items: center; justify-content: space-between;
    }
    .notif-item {
      padding: 10px 16px; border-bottom: 1px solid #f8f9fa;
      display: flex; gap: 10px; align-items: flex-start; cursor: pointer; transition: background 0.1s;
    }
    .notif-item:hover { background: #fafbfc; }
    .notif-item:last-child { border-bottom: none; }
    .notif-ico { font-size: 13px; margin-top: 2px; flex-shrink: 0; }
    .notif-project { font-size: 12px; font-weight: 600; color: #18243f; }
    .notif-msg { font-size: 11px; color: #555; margin-top: 1px; line-height: 1.4; }
    .notif-time { font-size: 10px; color: #a6abb6; margin-top: 2px; }

    /* ── PHASE TIMELINE ─────────────────────────────────────── */
    .phase-timeline-wrap { overflow-x: auto; padding: 10px 0 4px; }
    .phase-timeline { display: flex; align-items: flex-start; min-width: max-content; }
    .phase-step { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 72px; }
    .phase-dot {
      width: 11px; height: 11px; border-radius: 50%;
      border: 2px solid #dce1e7; background: #fff; transition: all 0.2s;
    }
    .phase-step.past .phase-dot   { background: #006227; border-color: #006227; }
    .phase-step.current .phase-dot{ background: #f15a29; border-color: #f15a29; width: 15px; height: 15px; box-shadow: 0 0 0 3px rgba(244,121,32,0.2); }
    .phase-lbl { font-size: 9px; color: #bbb; margin-top: 6px; text-align: center; line-height: 1.35; padding: 0 2px; }
    .phase-step.past .phase-lbl    { color: #006227; }
    .phase-step.current .phase-lbl { color: #f15a29; font-weight: 700; font-size: 10px; }
    .phase-conn { flex: 1; height: 2px; background: #dce1e7; margin-top: 5px; min-width: 10px; align-self: flex-start; margin-top: 9px; }
    .phase-conn.done { background: #006227; }

    /* ── FORM CONTROLS ─────────────────────────────────────── */
    .form-group { margin-bottom: 14px; }
    .form-group label { display: block; font-size: 11px; font-weight: 700; color: #5e6268; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 5px; }
    .form-group label span.req { color: #8b0e04; margin-left: 2px; }
    .form-control {
      width: 100%; padding: 8px 12px; border: 1.5px solid #dce1e7;
      border-radius: 6px; font-size: 13px; color: #18243f; background: #fff;
      font-family: inherit; transition: border-color 0.15s;
    }
    .form-control:focus { outline: none; border-color: #f15a29; box-shadow: 0 0 0 3px rgba(244,121,32,0.1); }
    textarea.form-control { resize: vertical; min-height: 72px; line-height: 1.5; }
    .form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
    .form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
    .form-hint { font-size: 11px; color: #a6abb6; margin-top: 4px; }
    .pm-preview {
      margin-top: 8px; padding: 8px 12px;
      background: rgba(244,121,32,0.08); border-radius: 6px;
      font-size: 12px; color: #c05e10; display: none; align-items: center; gap: 8px;
    }
    .pm-preview.show { display: flex; }
    .form-divider { border: none; border-top: 1px solid #f0f2f5; margin: 18px 0; }
    .form-section-label { font-size: 11px; font-weight: 700; color: #5e6268; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px; }
    .intake-modal-footer { padding: 16px 24px; border-top: 1px solid #f0f2f5; display: flex; align-items: center; justify-content: space-between; }

    /* ── TOAST ─────────────────────────────────────── */
    .toast {
      position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(70px);
      background: #18243f; color: #fff; padding: 13px 22px; border-radius: 8px;
      font-size: 13px; font-weight: 500; z-index: 9999;
      box-shadow: 0 8px 30px rgba(0,0,0,0.22);
      transition: transform 0.28s ease, opacity 0.28s ease; opacity: 0; white-space: nowrap;
      display: flex; align-items: center; gap: 10px;
    }
    .toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
    .toast.error { background: #a93226; }
    .toast-icon { font-size: 15px; }

    /* ── DEMO HIGHLIGHT ─────────────────────────────────────── */
    .demo-highlight {
      outline: 3px solid #f15a29 !important;
      outline-offset: 4px;
      border-radius: 10px;
      position: relative;
      z-index: 2;
      animation: demo-pulse 1s ease-in-out 3;
    }
    @keyframes demo-pulse {
      0%, 100% { box-shadow: 0 0 0 5px rgba(244,121,32,0.12), 0 0 18px rgba(244,121,32,0.25); }
      50%       { box-shadow: 0 0 0 10px rgba(244,121,32,0.22), 0 0 32px rgba(244,121,32,0.45); }
    }

    /* ── CONCEPT STAMP ─────────────────────────────────────── */
    .concept-stamp {
      position: fixed; bottom: 16px; right: 16px; z-index: 9999;
      background: #18243f; color: rgba(255,255,255,0.65);
      font-size: 9.5px; font-weight: 700; letter-spacing: 1.2px;
      text-transform: uppercase; padding: 6px 14px; border-radius: 20px;
    }

    /* ── HANDOFF BANNER ─────────────────────────────────────── */
    .handoff-banner {
      background: linear-gradient(135deg, #18243f, #1a3a5c);
      border-radius: 10px; padding: 16px 22px;
      display: flex; align-items: center; gap: 18px;
      margin-bottom: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    }
    .handoff-icon { font-size: 28px; color: #f15a29; }
    .handoff-content { flex: 1; }
    .handoff-title { font-size: 14px; font-weight: 700; color: #fff; }
    .handoff-sub { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 2px; }
    .handoff-tag {
      background: rgba(244,121,32,0.2); color: #f15a29;
      font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 20px;
    }

    /* ── FLAGGING TAB ─────────────────────────────────────── */
    .flag-role-switcher { display:flex; border:1px solid #dce1e7; border-radius:6px; overflow:hidden; }
    body.url-role-locked #flag-role-switcher { display:none !important; }
    /* Oracle Fusion architecture modal */
    .fusion-modal-overlay { position:fixed;inset:0;background:rgba(0,0,0,0.55);z-index:9999;display:flex;align-items:center;justify-content:center; }
    .fusion-modal { background:#fff;border-radius:14px;padding:32px 36px;max-width:560px;width:90vw;box-shadow:0 24px 60px rgba(0,0,0,0.25); }
    .fusion-modal h2 { font-size:17px;font-weight:800;color:#18243f;margin:0 0 6px; }
    .fusion-modal p { font-size:12.5px;color:#5e6268;margin:0 0 22px;line-height:1.6; }
    .fusion-arch { display:flex;flex-direction:column;gap:0;align-items:center;margin-bottom:24px; }
    .fusion-node { background:#f4f5f8;border:1px solid #dce1e7;border-radius:9px;padding:12px 20px;width:100%;text-align:center; }
    .fusion-node.primary { background:#18243f;color:#fff;border-color:#18243f; }
    .fusion-node.accent { background:#f15a29;color:#fff;border-color:#f15a29; }
    .fusion-node-title { font-size:13px;font-weight:800;margin-bottom:2px; }
    .fusion-node-sub { font-size:11px;opacity:0.75; }
    .fusion-arrow { font-size:20px;color:#bbb;line-height:1;padding:4px 0; }
    .flag-role-btn { background:#fff; color:#5e6268; font-size:12px; font-weight:600; padding:6px 14px; border:none; cursor:pointer; font-family:inherit; border-right:1px solid #dce1e7; transition:all 0.15s; display:inline-flex; align-items:center; gap:5px; }
    .flag-role-btn:last-child { border-right:none; }
    .flag-role-btn.active { background:#18243f; color:#fff; }
    .flag-role-btn.bnsf.active { background:#00468b; }
    .flag-role-btn.contractor.active { background:#006227; }
    .rwic-card { background:#f8f9fa; border-radius:8px; padding:11px 13px; margin-bottom:8px; display:flex; align-items:center; gap:11px; }
    .rwic-card:last-child { margin-bottom:0; }
    .rwic-avatar { width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:800; color:#fff; flex-shrink:0; }
    .rwic-name { font-size:13px; font-weight:700; color:#18243f; }
    .rwic-territory { font-size:10.5px; color:#5e6268; margin-top:1px; }
    .rwic-status-badge { font-size:10px; font-weight:700; padding:2px 8px; border-radius:10px; display:inline-block; }
    .rwic-status-badge.assigned { background:rgba(244,121,32,0.12); color:#c05e10; }
    .rwic-status-badge.leave { background:rgba(127,140,141,0.12); color:#5e6268; }
    .rwic-status-badge.available { background:rgba(39,174,96,0.12); color:#006227; }
    .rwic-assignment { font-size:10px; color:#5e6268; margin-top:2px; }
    .flag-status-badge { display:inline-flex; align-items:center; gap:4px; padding:3px 9px; border-radius:12px; font-size:11px; font-weight:600; }
    .flag-status-badge.submitted { background:rgba(127,140,141,0.12); color:#5e6268; }
    .flag-status-badge.under-review { background:rgba(41,128,185,0.12); color:#00468b; }
    .flag-status-badge.confirmed { background:rgba(0,70,139,0.12); color:#00468b; }
    .flag-status-badge.in-progress { background:rgba(244,121,32,0.12); color:#c05e10; }
    .flag-status-badge.completed { background:rgba(0,0,0,0.08); color:#000000; }
    .flag-status-badge.invoiced  { background:rgba(123,79,46,0.12); color:#7B4F2E; }
    .flag-status-badge.cancelled { background:rgba(231,76,60,0.1); color:#8b0e04; }
    .flag-tbl-wrap { overflow-x:auto; }
    .flag-tbl { width:100%; border-collapse:collapse; font-size:12.5px; }
    .flag-tbl th { text-align:left; font-size:10.5px; font-weight:700; color:#5e6268; text-transform:uppercase; letter-spacing:0.5px; padding:8px 12px; border-bottom:2px solid #f0f2f5; background:#fafbfc; white-space:nowrap; }
    .flag-tbl td { padding:9px 12px; border-bottom:1px solid #f8f9fa; vertical-align:middle; }
    .flag-tbl tr:hover td { background:#fafbfc; }
    .flag-tbl tr.row-hidden { display:none; }
    .flag-req-id { font-size:13px; font-weight:700; color:#00468b; }
    .flag-assign-btn { background:none; border:1px solid #00468b; color:#00468b; font-size:10.5px; padding:3px 9px; border-radius:5px; cursor:pointer; white-space:nowrap; font-family:inherit; }
    .flag-assign-btn:hover { background:#00468b; color:#fff; }
    .flag-assign-btn.view-btn { border-color:#dce1e7; color:#5e6268; }
    .flag-assign-btn.view-btn:hover { background:#5e6268; color:#fff; border-color:#5e6268; }
    .bnsf-readonly-notice { background:rgba(41,128,185,0.08); border:1px solid rgba(41,128,185,0.2); border-radius:8px; padding:10px 16px; display:flex; align-items:center; gap:10px; margin-bottom:14px; font-size:12px; color:#00468b; font-weight:600; }
    .contractor-form-card { background:rgba(39,174,96,0.05); border:1.5px dashed rgba(39,174,96,0.3); border-radius:10px; padding:24px; text-align:center; }
    .contractor-form-card i { font-size:28px; color:#006227; margin-bottom:10px; display:block; }
    .contractor-form-card h3 { font-size:15px; font-weight:700; color:#18243f; margin-bottom:6px; }
    .contractor-form-card p { font-size:12px; color:#555; line-height:1.55; margin-bottom:14px; }

    /* ── FLAG WIZARD STEPS ─────────────────────────────────────── */
    .flag-wizard-steps { display:flex; align-items:center; width:100%; }
    .flag-wiz-step { display:flex; align-items:center; gap:7px; font-size:12px; font-weight:600; color:#a6abb6; white-space:nowrap; }
    .flag-wiz-step.active { color:#00468b; }
    .flag-wiz-step.done   { color:#006227; }
    .flag-wiz-num { width:22px; height:22px; border-radius:50%; background:#e0e3e9; color:#5e6268; font-size:11px; font-weight:800; display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; }
    .flag-wiz-step.active .flag-wiz-num { background:#00468b; color:#fff; }
    .flag-wiz-step.done   .flag-wiz-num { background:#006227; color:#fff; }
    .flag-wiz-conn { flex:1; height:1.5px; background:#e0e3e9; margin:0 6px; min-width:10px; }
    .flag-wiz-conn.done { background:#006227; }
    .flag-contact-block { background:#f8f9fa; border-radius:8px; padding:14px 16px; margin-bottom:12px; }
    .flag-contact-block:last-child { margin-bottom:0; }
    .flag-contact-hdr { font-size:11px; font-weight:700; color:#5e6268; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:12px; display:flex; align-items:center; justify-content:space-between; }
    .flag-same-label { font-size:11px; font-weight:600; color:#00468b; cursor:pointer; text-transform:none; letter-spacing:0; margin:0; display:flex; align-items:center; gap:5px; }

    /* ── Flagging Dashboard ── */
    #flag-map { height:340px; width:100%; }
    .flag-rwic-strip { display:flex; gap:10px; padding:12px 16px; overflow-x:auto; -webkit-overflow-scrolling:touch; }
    .rwic-card-h { background:#f8f9fa; border-radius:8px; padding:11px 14px; min-width:188px; display:flex; flex-direction:column; gap:4px; border-left:3px solid #dce1e7; flex-shrink:0; }
    .rwic-card-h .rwic-name { font-size:13px; font-weight:700; color:#18243f; }
    .rwic-card-h .rwic-terr { font-size:10.5px; color:#5e6268; }
    .rwic-card-h .rwic-assign-sm { font-size:11px; color:#18243f; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:170px; }
    .flag-lead-ok   { color:#5e6268; font-size:11.5px; }
    .flag-lead-warn { color:#f15a29; font-weight:700; font-size:11.5px; }
    .flag-lead-risk { color:#8b0e04; font-weight:700; font-size:11.5px; }
    .flag-lead-past { color:#006227; font-size:11.5px; }
    .flag-detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px 28px; margin-bottom:16px; }
    .flag-detail-field label { font-size:10.5px; font-weight:700; color:#5e6268; text-transform:uppercase; letter-spacing:0.5px; display:block; margin-bottom:2px; }
    .flag-detail-field .val { font-size:13px; font-weight:500; color:#18243f; }
    .flag-note-item { background:#f8f9fa; border-radius:6px; padding:8px 10px; margin-bottom:6px; }
    .flag-note-item .note-meta { font-size:10px; color:#5e6268; margin-bottom:2px; font-weight:600; }
    .flag-note-item .note-text { font-size:12px; color:#18243f; }
    .flag-chart-wrap { height:220px; padding:0 4px 10px; }
    .flag-map-legend { display:flex; gap:14px; flex-wrap:wrap; padding:8px 16px 10px; border-top:1px solid #f0f2f5; }
    .flag-map-legend-item { display:flex; align-items:center; gap:5px; font-size:11.5px; color:#555; }
    .flag-map-legend-dot { width:11px; height:11px; border-radius:50%; flex-shrink:0; }
    .flag-provider-legend { display:flex; flex-direction:column; gap:7px; padding:10px 0; }
    .flag-prov-row { display:flex; align-items:center; justify-content:space-between; font-size:12px; }
    .flag-prov-swatch { width:12px; height:12px; border-radius:3px; flex-shrink:0; }
    .flag-status-action { padding:5px 12px; border-radius:5px; border:1px solid; cursor:pointer; font-size:11.5px; font-weight:600; background:#fff; margin-right:5px; margin-bottom:5px; }
    .flag-filter-prov { /* uses filter-select */ }

    /* ── Lead Time Risk Panel ── */
    .flag-risk-panel { background:linear-gradient(135deg,#fdecea 0%,#fef9f0 100%); border:1px solid rgba(192,57,43,0.25); border-radius:10px; padding:14px 18px; margin-bottom:14px; }
    .flag-risk-title { font-size:11.5px; font-weight:800; color:#c0392b; letter-spacing:0.5px; text-transform:uppercase; margin-bottom:10px; display:flex; align-items:center; gap:7px; }
    .flag-risk-row { display:flex; align-items:center; gap:8px; padding:7px 0; border-bottom:1px solid rgba(192,57,43,0.1); font-size:12px; cursor:pointer; }
    .flag-risk-row:last-child { border-bottom:none; }
    .flag-risk-row:hover { background:rgba(192,57,43,0.04); border-radius:4px; }
    .flag-risk-days { font-weight:800; min-width:36px; font-size:13px; }
    .flag-risk-days.urgent { color:#8b0e04; }
    .flag-risk-days.warn   { color:#f15a29; }

    /* ── Gantt Calendar ── */
    .gantt-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; padding-bottom:6px; }
    .gantt-grid { display:flex; flex-direction:column; min-width:740px; }
    .gantt-hdr { display:flex; margin-left:145px; border-bottom:2px solid #e0e4e8; margin-bottom:4px; padding-bottom:4px; }
    .gantt-month-lbl { font-size:9.5px; font-weight:800; color:#5e6268; text-transform:uppercase; letter-spacing:0.5px; flex-shrink:0; text-align:center; }
    .gantt-row { display:flex; align-items:center; margin-bottom:3px; }
    .gantt-name { width:143px; flex-shrink:0; padding-right:8px; }
    .gantt-name-main { font-size:11.5px; font-weight:600; color:#18243f; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .gantt-name-sub  { font-size:9px; color:#5e6268; font-weight:600; }
    .gantt-track { flex:1; height:26px; background:#f0f2f5; border-radius:4px; position:relative; }
    .gantt-today-line { position:absolute; top:-4px; bottom:-4px; width:2px; background:#8b0e04; z-index:3; pointer-events:none; border-radius:1px; }
    .gantt-today-label { position:absolute; top:-16px; transform:translateX(-50%); font-size:8px; font-weight:800; color:#8b0e04; white-space:nowrap; }
    .gantt-bar { position:absolute; top:3px; height:20px; border-radius:3px; display:flex; align-items:center; justify-content:center; font-size:9.5px; font-weight:700; color:#fff; overflow:hidden; white-space:nowrap; padding:0 5px; cursor:pointer; z-index:2; transition:filter .15s; box-shadow:0 1px 3px rgba(0,0,0,0.15); }
    .gantt-bar:hover { filter:brightness(1.12); }
    .gantt-leave-bar { position:absolute; top:3px; height:20px; border-radius:3px; background:repeating-linear-gradient(45deg,#d9e0e7,#d9e0e7 2px,#f0f2f5 2px,#f0f2f5 8px); border:1px dashed #bdc3c7; z-index:1; }
    .gantt-month-tick { position:absolute; top:0; bottom:0; width:1px; background:rgba(0,0,0,0.06); z-index:1; }

    /* ── BNSF Submission Tracker ── */
    .bnsf-tracker { display:flex; align-items:flex-start; gap:0; margin:8px 0 2px; }
    .bnsf-track-step { flex:1; text-align:center; position:relative; }
    .bnsf-track-step::after { content:''; position:absolute; top:10px; left:50%; width:100%; height:2px; background:#dce1e7; z-index:0; }
    .bnsf-track-step:last-child::after { display:none; }
    .bnsf-track-dot { width:20px; height:20px; border-radius:50%; background:#e8ecf0; border:2px solid #dce1e7; display:flex; align-items:center; justify-content:center; margin:0 auto 5px; position:relative; z-index:1; font-size:9px; color:#5e6268; font-weight:800; transition:all .2s; }
    .bnsf-track-step.done   .bnsf-track-dot { background:#006227; border-color:#006227; color:#fff; }
    .bnsf-track-step.active .bnsf-track-dot { background:#00468b; border-color:#00468b; color:#fff; box-shadow:0 0 0 3px rgba(52,152,219,0.2); }
    .bnsf-track-step.done::after { background:#006227; }
    .bnsf-track-lbl { font-size:8.5px; font-weight:600; color:#bbb; text-transform:uppercase; letter-spacing:0.3px; line-height:1.3; }
    .bnsf-track-step.done   .bnsf-track-lbl,
    .bnsf-track-step.active .bnsf-track-lbl { color:#18243f; }
    .bnsf-track-btns { display:flex; gap:6px; margin-top:10px; flex-wrap:wrap; }
    .bnsf-track-btn { font-size:11px; font-weight:600; padding:4px 10px; border-radius:5px; border:1px solid #00468b; cursor:pointer; background:#fff; color:#00468b; }
    .bnsf-track-btn:hover { background:#ebf5fb; }

    /* ── Certification Badges ── */
    .cert-badge { display:inline-flex; align-items:center; gap:4px; font-size:9.5px; font-weight:700; padding:2px 8px; border-radius:8px; margin:2px; }
    .cert-valid    { background:#eafaf1; color:#1e8449; }
    .cert-expiring { background:#fef9e7; color:#d35400; }
    .cert-expired  { background:#fdecea; color:#a93226; }

    /* ── Invoice Log ── */
    .invoice-row { display:flex; gap:8px; align-items:center; padding:5px 10px; background:#f8f9fa; border-radius:6px; margin-bottom:4px; font-size:11.5px; flex-wrap:wrap; }
    .inv-status { font-size:9.5px; font-weight:700; padding:2px 7px; border-radius:8px; flex-shrink:0; }
    .inv-pending   { background:#fef9e7; color:#d35400; }
    .inv-submitted { background:#ebf5fb; color:#00468b; }
    .inv-paid      { background:#eafaf1; color:#1e8449; }

    /* ── Conflict Warning ── */
    .conflict-warn { background:#fdecea; border:1px solid rgba(192,57,43,0.3); border-radius:6px; padding:9px 13px; font-size:12px; color:#a93226; margin-top:8px; }

    /* ── Print ── */
    @media print {
      .header,.sidebar,.demo-bar,.flag-role-switcher,.page-actions,.filter-bar,
      .flag-admin-only,#flag-risk-panel,.card-header .btn,.modal,
      .bnsf-readonly-notice { display:none !important; }
      .main { margin-left:0 !important; padding:10px !important; }
      .card { box-shadow:none !important; border:1px solid #ddd !important; break-inside:avoid; margin-bottom:12px !important; }
    }

    /* Password gate */
    #pw-gate { position:fixed;inset:0;z-index:99999;background:#0f1f3d;display:flex;align-items:center;justify-content:center; }
    #pw-gate.hidden { display:none; }

    /* Module selector */
    #module-select { position:fixed;inset:0;z-index:9999;background:#0f1f3d;display:none;align-items:center;justify-content:center;flex-direction:column;overflow-y:auto; }
    #module-select.visible { display:flex; }
    .ms-header { text-align:center;margin-bottom:40px; }
    .ms-header img { max-width:300px;width:100%;height:auto;margin-bottom:20px;display:block;margin-left:auto;margin-right:auto; }
    .ms-header h2 { color:#fff;font-size:22px;font-weight:800;letter-spacing:0.5px;margin-bottom:6px; }
    .ms-header p { color:rgba(255,255,255,0.6);font-size:14px; }
    .ms-cards { display:flex;gap:16px;flex-wrap:wrap;justify-content:center;max-width:900px;padding:0 20px; }
    .ms-card { background:#fff;border-radius:14px;padding:32px 28px;width:260px;cursor:pointer;text-align:center;transition:transform 0.15s,box-shadow 0.15s;box-shadow:0 8px 30px rgba(0,0,0,0.25); }
    .ms-card:hover { transform:translateY(-4px);box-shadow:0 16px 40px rgba(0,0,0,0.35); }
    .ms-card-icon { font-size:36px;margin-bottom:12px;min-height:52px;display:flex;align-items:center;justify-content:center; }
    .ms-card-icon img { display:block;max-width:130px;height:auto; }
    .ms-card-title { font-size:16px;font-weight:800;color:#18243f;margin-bottom:6px; }
    .ms-card-desc { font-size:13px;color:#5e6268;line-height:1.5; }
    .ms-footer { margin-top:32px;margin-bottom:24px;font-size:11px;color:rgba(255,255,255,0.35);text-align:center; }
    @media (max-width:640px) {
      #module-select { justify-content:flex-start;padding:24px 0 32px; }
      .ms-header { margin-bottom:24px; }
      .ms-header img { max-width:200px;margin-bottom:14px; }
      .ms-cards { gap:12px;padding:0 16px;width:100%; }
      .ms-card { width:100%;max-width:400px;padding:20px 20px;border-radius:12px; }
      .ms-card-icon { min-height:40px;margin-bottom:8px; }
      .ms-card-icon img { max-width:110px; }
      .ms-card-title { font-size:15px; }
      .ms-card-desc { font-size:12px; }
    }
    #pw-card { background:#fff;border-radius:14px;padding:40px 44px;width:340px;max-width:90vw;box-shadow:0 24px 60px rgba(0,0,0,0.4);text-align:center; }
    #pw-card .pw-logo { font-size:13px;font-weight:800;letter-spacing:2px;color:#5e6268;text-transform:uppercase;margin-bottom:6px; }
    #pw-card h2 { font-size:18px;font-weight:800;color:#18243f;margin:0 0 4px; }
    #pw-card p { font-size:12px;color:#a6abb6;margin:0 0 20px; }
    #pw-card label { display:block;font-size:11px;font-weight:700;color:#5e6268;text-align:left;margin-bottom:4px;letter-spacing:0.5px;text-transform:uppercase; }
    #pw-name { width:100%;box-sizing:border-box;padding:11px 14px;border:1.5px solid #dce1e7;border-radius:8px;font-size:14px;font-family:'Libre Franklin','Franklin Gothic Medium','Arial Narrow',sans-serif;outline:none;margin-bottom:10px; }
    #pw-name:focus { border-color:#f15a29; }
    #pw-input { width:100%;box-sizing:border-box;padding:11px 14px;border:1.5px solid #dce1e7;border-radius:8px;font-size:15px;font-family:'Libre Franklin','Franklin Gothic Medium','Arial Narrow',sans-serif;outline:none;text-align:center;letter-spacing:3px;margin-bottom:12px; }
    #pw-input:focus { border-color:#f15a29; }
    #pw-btn { width:100%;padding:12px;background:#f15a29;color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:700;cursor:pointer;font-family:'Libre Franklin','Franklin Gothic Medium','Arial Narrow',sans-serif; }
    #pw-btn:hover { background:#d4611a; }
    #pw-error { font-size:12px;color:#8b0e04;margin-top:10px;min-height:16px; }

/* ── field pulse / print (was inline block 2) ── */
@keyframes fieldPulse {
  0%,100% { box-shadow:0 0 0 3px rgba(0,98,39,0.25); }
  50%      { box-shadow:0 0 0 6px rgba(0,98,39,0.08); }
}
.field-table { width:100%; border-collapse:collapse; font-size:12.5px; }
.field-table th { background:#f4f6f9; color:#5e6268; font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; padding:8px 12px; text-align:left; border-bottom:1px solid #e4e8ee; }
.field-table td { padding:9px 12px; border-bottom:1px solid #f0f2f5; vertical-align:middle; color:#18243f; }
.field-table tr:last-child td { border-bottom:none; }
.field-table tr:hover td { background:#f9fafb; }
.field-vendor-badge { display:inline-block; font-size:10.5px; font-weight:700; padding:2px 8px; border-radius:10px; }
.field-vendor-railpros  { background:rgba(192,57,43,0.1);  color:#c0392b; }
.field-vendor-nrss      { background:rgba(0,70,139,0.1);   color:#00468b; }
.field-vendor-bnsf      { background:rgba(241,90,41,0.12); color:#c04020; }
.field-vendor-lja       { background:rgba(211,84,0,0.1);   color:#d35400; }
.field-vendor-zephyr    { background:rgba(22,160,133,0.1); color:#16a085; }
.field-vendor-tracktech { background:rgba(46,125,50,0.1);   color:#2e7d32; }
.field-vendor-other     { background:rgba(94,98,104,0.08); color:#5e6268; }
.field-count-chip { display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:#e8f0fe;color:#00468b;font-weight:800;font-size:11px; }

/* ── TERRITORY SUMMARY CARDS ── */
.territory-cards { display:grid; grid-template-columns:repeat(8,1fr); gap:10px; margin-bottom:14px; }
@media(max-width:1100px){ .territory-cards { grid-template-columns:repeat(4,1fr); } }
@media(max-width:600px) { .territory-cards { grid-template-columns:repeat(2,1fr); } }
.tc-card { background:#fff; border-radius:9px; padding:11px 13px; box-shadow:0 1px 4px rgba(0,0,0,0.07); border-top:3px solid #00468b; cursor:pointer; transition:box-shadow 0.15s; }
.tc-card:hover { box-shadow:0 3px 12px rgba(0,70,139,0.13); }
.tc-card-name { font-size:9.5px; font-weight:800; color:#5e6268; text-transform:uppercase; letter-spacing:0.4px; margin-bottom:5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tc-card-count { font-size:22px; font-weight:800; color:#18243f; line-height:1; }
.tc-card-sub { font-size:10px; color:#a6abb6; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tc-card-badges { display:flex; gap:5px; margin-top:7px; flex-wrap:wrap; }
.tc-badge { font-size:9.5px; font-weight:700; padding:1px 6px; border-radius:7px; white-space:nowrap; }
.tc-badge.risk { background:rgba(139,14,4,0.09); color:#8b0e04; }
.tc-badge.attn { background:rgba(241,90,41,0.1); color:#c04020; }
.tc-badge.ok   { background:rgba(0,98,39,0.09);  color:#006227; }

/* ── DAYS IN QUEUE BADGE ── */
.queue-age { display:inline-block; font-size:10px; font-weight:800; padding:1px 8px; border-radius:8px; }
.queue-age.fresh { background:rgba(0,98,39,0.1);   color:#006227; }
.queue-age.mid   { background:rgba(241,90,41,0.1); color:#c04020; }
.queue-age.old   { background:rgba(139,14,4,0.1);  color:#8b0e04; }

/* ── ACTIVITY LOG ── */
.activity-log { display:flex; flex-direction:column; gap:10px; }
.activity-entry { display:flex; gap:10px; align-items:flex-start; }
.activity-dot { width:8px; height:8px; border-radius:50%; background:#00468b; flex-shrink:0; margin-top:5px; }
.activity-dot.orange { background:#f15a29; }
.activity-dot.green  { background:#006227; }
.activity-dot.grey   { background:#a6abb6; }
.activity-text { font-size:12px; color:#18243f; line-height:1.5; flex:1; }
.activity-time { font-size:10.5px; color:#a6abb6; white-space:nowrap; }
.activity-add-row { display:flex; gap:8px; margin-top:12px; }
.activity-add-row input { flex:1; padding:6px 10px; border:1px solid #dce1e7; border-radius:6px; font-size:12px; font-family:inherit; outline:none; }
.activity-add-row input:focus { border-color:#00468b; }
.activity-add-row button { white-space:nowrap; }

/* ── SORTABLE TH ── */
.sortable-th { cursor:pointer; user-select:none; }
.sortable-th:hover { background:#edf0f4 !important; }
.sort-icon { margin-left:4px; font-size:9px; color:#c0c5ce; }
.sort-icon.asc::after  { content:'▲'; color:#00468b; }
.sort-icon.desc::after { content:'▼'; color:#00468b; }
.sort-icon:not(.asc):not(.desc)::after { content:'⇅'; }

/* ── PRINT ── */
@media print {
  body > *:not(.modal-overlay) { display:none !important; }
  .modal-overlay { display:flex !important; position:static !important; background:none !important; z-index:auto !important; }
  .modal-overlay .modal { box-shadow:none !important; max-height:none !important; overflow:visible !important; border:1px solid #dce1e7; }
  .no-print { display:none !important; }
}

/* ── Column filters (BPS review 07/16 item #6) ── */
.col-filter-row th { padding: 4px 8px 8px; background: #fafbfc; }
.col-filter-input { width: 100%; box-sizing: border-box; padding: 4px 7px; font-size: 11px; border: 1px solid #dce1e7; border-radius: 5px; color: #18243f; font-family: inherit; outline: none; }
.col-filter-input:focus { border-color: #f15a29; }
