
    
    
    
    /* ========================================
       CSS Variables - SimpleSuite Dark Theme
       ======================================== */
    :root {
      --bg-dark: #f7f3ea;
      --bg-card: #fffdf8;
      --bg-input: #f0ebdf;
      --border: #e8e0d0;
      --border-dark: #d8cdb8;
      --text: #2a2620;
      --text-muted: #6f685a;
      --text-faint: #9c9484;
      --primary: #b07d1c;
      --primary-hover: #946616;
      --primary-soft: #f4ead3;
      --danger: #b1502f;
      --warning: #c2691f;
      --info: #4a6b7a;
      --purple: #7c6f9c;
      --radius: 10px;
      --shadow: 0 1px 3px rgba(60,50,30,0.06), 0 1px 2px rgba(60,50,30,0.04);
      --shadow-lg: 0 4px 14px rgba(60,50,30,0.08), 0 2px 4px rgba(60,50,30,0.05);
      --font-sans: 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
      --font-serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
    }


    /* ========================================
       QR Share Feature
       ======================================== */
    .qr-modal-body {
      text-align: center;
      padding: 24px;
    }
    .qr-modal-body h2 {
      margin-bottom: 6px;
      font-size: 18px;
    }
    .qr-modal-body .qr-subtitle {
      color: var(--text-muted);
      font-size: 13px;
      margin-bottom: 20px;
    }
    #qr-canvas {
      display: inline-block;
      padding: 16px;
      background: #fff;
      border-radius: 12px;
      margin-bottom: 16px;
    }
    .qr-co-details {
      background: var(--bg-input);
      border-radius: 8px;
      padding: 14px 16px;
      text-align: left;
      margin-bottom: 16px;
      font-size: 13px;
    }
    .qr-co-details .qr-co-title {
      font-weight: 600;
      font-size: 15px;
      margin-bottom: 6px;
    }
    .qr-co-details .qr-co-row {
      display: flex;
      justify-content: space-between;
      color: var(--text-muted);
      margin-top: 4px;
    }
    .qr-co-details .qr-co-row span:last-child {
      color: var(--text);
      font-weight: 500;
    }
    .qr-instructions {
      font-size: 12px;
      color: var(--text-muted);
      margin-top: 8px;
    }
    .btn-share {
      background: var(--info);
      color: white;
      border: none;
      padding: 5px 10px;
      border-radius: 6px;
      font-size: 12px;
      cursor: pointer;
      font-weight: 500;
    }
    .btn-share:hover { background: #3a5763; }
    .approval-recorded-banner {
      background: rgba(16,185,129,0.15);
      border: 1px solid var(--primary);
      border-radius: 8px;
      padding: 10px 14px;
      font-size: 13px;
      color: var(--primary);
      margin-top: 8px;
    }

    /* ========================================
       Reset & Base
       ======================================== */
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    body {
      font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      background: var(--bg-dark);
      color: var(--text);
      line-height: 1.5;
    }

    /* ========================================
       Layout
       ======================================== */
    .app {
      display: flex;
      min-height: 100vh;
    }

    .sidebar {
      width: 240px;
      background: var(--bg-card);
      border-right: 1px solid var(--border);
      padding: 20px 0;
      flex-shrink: 0;
    }

    .sidebar-header {
      padding: 0 20px 20px;
      border-bottom: 1px solid var(--border);
      margin-bottom: 20px;
    }

    .sidebar-header h1 {
      font-size: 20px;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .logo-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      background: linear-gradient(135deg, var(--primary), var(--info));
      border-radius: 8px;
      font-size: 14px;
      font-weight: 700;
      color: white;
    }

    .sidebar-header p {
      font-size: 12px;
      color: var(--text-muted);
      margin-top: 4px;
    }

    .nav-item {
      display: block;
      padding: 12px 20px;
      color: var(--text-muted);
      text-decoration: none;
      cursor: pointer;
      transition: all 0.2s;
      font-weight: 500;
    }

    .nav-item:hover {
      background: var(--bg-input);
      color: var(--text);
    }

    .nav-item.active {
      background: var(--primary);
      color: white;
    }

    .main {
      flex: 1;
      padding: 24px;
      overflow-y: auto;
    }

    /* ========================================
       Cards
       ======================================== */
    .card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 20px;
      margin-bottom: 20px;
    }

    .card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 16px;
    }

    .card-title {
      font-size: 16px;
      font-weight: 600;
    }

    /* ========================================
       Buttons
       ======================================== */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 16px;
      border-radius: var(--radius);
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      border: none;
      transition: all 0.2s;
      font-family: inherit;
    }

    .btn-primary {
      background: var(--primary);
      color: white;
    }

    .btn-primary:hover {
      background: var(--primary-hover);
    }

    .btn-secondary {
      background: var(--bg-input);
      color: var(--text);
      border: 1px solid var(--border);
    }

    .btn-secondary:hover {
      background: var(--border);
    }

    .btn-danger {
      background: var(--danger);
      color: white;
    }

    .btn-danger:hover {
      background: #8f3f23;
    }

    .btn-small {
      padding: 4px 12px;
      font-size: 13px;
    }

    /* ========================================
       Forms
       ======================================== */
    .form-group {
      margin-bottom: 16px;
    }

    .form-label {
      display: block;
      font-size: 14px;
      font-weight: 500;
      margin-bottom: 6px;
      color: var(--text-muted);
    }

    .form-input, .form-select, .form-textarea {
      width: 100%;
      padding: 10px 12px;
      background: var(--bg-input);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      font-size: 14px;
      font-family: inherit;
      color: var(--text);
      transition: border-color 0.2s;
    }

    .form-input:focus, .form-select:focus, .form-textarea:focus {
      outline: none;
      border-color: var(--primary);
    }

    .form-input::placeholder, .form-textarea::placeholder {
      color: var(--text-muted);
    }

    .form-textarea {
      min-height: 100px;
      resize: vertical;
    }

    .form-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }

    /* ========================================
       Status Badges
       ======================================== */
    .badge {
      display: inline-block;
      padding: 3px 10px;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.02em;
    }

    /* Warm status palette: sand=neutral, slate=in-flight, amber=contracted(brand),
       green=go/positive, plum=delivered, orange=awaiting, clay=negative */
    .badge-lead { background: #efe9dc; color: #8a8372; }
    .badge-proposal { background: #e7ecef; color: #3a5763; }
    .badge-sent { background: #e7ecef; color: #3a5763; }
    .badge-contracted { background: #f4ead3; color: #8a6113; }
    .badge-progress { background: #e6efe7; color: #2f6b53; }
    .badge-in { background: #e6efe7; color: #2f6b53; }
    .badge-delivered { background: #efe7ee; color: #7a5c6e; }
    .badge-completed { background: #2f6b53; color: #fffdf8; }
    .badge-cancelled { background: #efe9dc; color: #8a8372; }
    .badge-pending { background: #f6e6d6; color: #a8551a; }
    .badge-approved { background: #e6efe7; color: #2f6b53; }
    .badge-declined { background: #f4e6df; color: #8f3f23; }
    .badge-draft { background: #efe9dc; color: #8a8372; }
    .badge-paid { background: #2f6b53; color: #fffdf8; }
    .badge-overdue { background: #b1502f; color: #fffdf8; }
    .badge-friendly { background: #e6efe7; color: #2f6b53; }
    .badge-professional { background: #e7ecef; color: #3a5763; }
    .badge-formal { background: #efe7ee; color: #7a5c6e; }
    /* multi-word statuses (class = status lowercased, spaces stripped) */
    .badge-proposalsent { background: #e7ecef; color: #3a5763; }
    .badge-inprogress { background: #e6efe7; color: #2f6b53; }
    .badge-notstarted { background: #efe9dc; color: #8a8372; }
    .badge-done { background: #e6efe7; color: #2f6b53; }

    /* ========================================
       Project List
       ======================================== */
    .project-list {
      list-style: none;
    }

    .project-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 16px;
      border-bottom: 1px solid var(--border);
      cursor: pointer;
      transition: background 0.2s;
    }

    .project-item:hover {
      background: var(--bg-input);
    }

    .project-item:last-child {
      border-bottom: none;
    }

    .project-name {
      font-weight: 500;
    }

    .project-client {
      font-size: 13px;
      color: var(--text-muted);
    }

    .project-meta {
      text-align: right;
    }

    .project-amount {
      font-family: var(--font-serif);
      font-size: 16px;
      font-weight: 500;
      margin-top: 4px;
    }

    /* ========================================
       Dashboard Alerts
       ======================================== */
    .alert {
      padding: 12px 16px;
      border-radius: var(--radius);
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 12px;
      background: var(--bg-input);
    }

    .alert-warning {
      border-left: 4px solid var(--warning);
    }

    .alert-warning:hover {
      background: var(--border);
    }

    .alert-danger {
      border-left: 4px solid var(--danger);
    }

    .alert-danger:hover {
      background: var(--border);
    }

    .alert-icon {
      font-size: 20px;
    }

    /* ========================================
       Task List
       ======================================== */
    .task-list {
      list-style: none;
    }

    .task-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 0;
      border-bottom: 1px solid var(--border);
    }

    .task-item:last-child {
      border-bottom: none;
    }

    .task-checkbox {
      width: 20px;
      height: 20px;
      cursor: pointer;
      accent-color: var(--primary);
    }

    .task-description {
      flex: 1;
    }

    .task-description.done {
      text-decoration: line-through;
      color: var(--text-muted);
    }

    /* ========================================
       Modal
       ======================================== */
    .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0,0,0,0.7);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1000;
    }

    .modal-overlay.hidden {
      display: none;
    }

    .modal {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: var(--shadow-lg);
      width: 100%;
      max-width: 500px;
      max-height: 90vh;
      overflow-y: auto;
    }

    .modal-header {
      padding: 20px;
      border-bottom: 1px solid var(--border);
    }

    .modal-header h2 {
      font-size: 18px;
    }

    .modal-body {
      padding: 20px;
    }

    .modal-footer {
      padding: 16px 20px;
      border-top: 1px solid var(--border);
      display: flex;
      justify-content: flex-end;
      gap: 12px;
    }

    /* ========================================
       Scope Check Dialog - The Key Feature
       ======================================== */
    .scope-check {
      background: rgba(245, 158, 11, 0.1);
      border: 1px solid var(--warning);
      border-radius: var(--radius);
      padding: 20px;
      margin-bottom: 20px;
    }

    .scope-check h3 {
      color: var(--warning);
      margin-bottom: 12px;
    }

    .scope-check p {
      margin-bottom: 16px;
    }

    .scope-check-buttons {
      display: flex;
      gap: 12px;
    }

    /* ========================================
       Progress Bar
       ======================================== */
    .progress-bar {
      height: 8px;
      background: var(--bg-input);
      border-radius: 100px;
      overflow: hidden;
    }

    .progress-fill {
      height: 100%;
      background: var(--primary);
      transition: width 0.3s;
    }

    .progress-label {
      font-size: 13px;
      color: var(--text-muted);
      margin-top: 6px;
    }

    /* ========================================
       Empty State
       ======================================== */
    .empty-state {
      text-align: center;
      padding: 40px;
      color: var(--text-muted);
    }

    .empty-state h3 {
      color: var(--text);
      margin-bottom: 8px;
    }

    /* ========================================
       Page Header
       ======================================== */
    .page-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 24px;
    }

    .page-title {
      font-size: 24px;
      font-weight: 700;
    }

    /* ========================================
       Suggested Action
       ======================================== */
    .suggested-action {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-left: 4px solid var(--primary);
      border-radius: var(--radius);
      padding: 16px 20px;
      margin-bottom: 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .suggested-action p {
      font-size: 12px;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .suggested-action strong {
      display: block;
      font-size: 16px;
      margin-top: 4px;
      color: var(--primary);
    }

    .suggested-action .btn {
      background: var(--primary);
      color: white;
    }

    /* ========================================
       Scope Items Section
       ======================================== */
    .scope-section {
      margin-bottom: 24px;
    }

    .scope-item {
      background: var(--bg-input);
      border-radius: var(--radius);
      padding: 16px;
      margin-bottom: 12px;
    }

    .scope-item-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;
    }

    .scope-item-title {
      font-weight: 500;
    }

    /* ========================================
       Change Order Banner
       ======================================== */
    .change-order-banner {
      background: rgba(245, 158, 11, 0.1);
      border-left: 4px solid var(--warning);
      padding: 12px 16px;
      margin-bottom: 20px;
      border-radius: 0 var(--radius) var(--radius) 0;
    }

    .change-order-banner strong {
      color: var(--warning);
    }

    /* ========================================
       Stat Cards
       ======================================== */
    .stat-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 20px;
    }

    .stat-value {
      font-family: var(--font-serif);
      font-size: 34px;
      font-weight: 500;
      letter-spacing: -0.01em;
    }

    .stat-value.positive { color: var(--primary); }
    .stat-value.negative { color: var(--danger); }

    .stat-label {
      color: var(--text-muted);
      font-size: 14px;
      margin-top: 4px;
    }

    /* ========================================
       Archived items
       ======================================== */
    .archived-item {
      opacity: 0.5;
    }

    /* ========================================
       Floating Request Button
       ======================================== */
    .floating-btn {
      position: fixed;
      bottom: 24px;
      right: 24px;
      background: var(--warning);
      color: white;
      border: none;
      border-radius: 50px;
      padding: 16px 24px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
      transition: all 0.2s;
      z-index: 100;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .floating-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(245, 158, 11, 0.5);
    }

    /* ========================================
       Request Log List
       ======================================== */
    .request-item {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      padding: 12px 0;
      border-bottom: 1px solid var(--border);
    }

    .request-item:last-child {
      border-bottom: none;
    }

    .request-date {
      font-size: 12px;
      color: var(--text-muted);
    }

    .request-text {
      flex: 1;
      margin: 0 16px;
    }

    .request-outcome {
      font-size: 12px;
      padding: 2px 8px;
      border-radius: 4px;
    }

    .request-outcome.covered {
      background: rgba(16, 185, 129, 0.2);
      color: var(--primary);
    }

    .request-outcome.change-order {
      background: rgba(245, 158, 11, 0.2);
      color: var(--warning);
    }

    .request-outcome.pending {
      background: var(--bg-input);
      color: var(--text-muted);
    }

    /* ========================================
       Checkbox styling
       ======================================== */
    input[type="checkbox"] {
      accent-color: var(--primary);
    }

    /* ========================================
       Select option styling (for dropdowns)
       ======================================== */
    .form-select option {
      background: var(--bg-input);
      color: var(--text);
    }

    /* ========================================
       Small text helper
       ======================================== */
    small {
      color: var(--text-muted);
    }
  

/* Small responsive changes for this translated, static edition. */
@media(max-width:760px){.app{display:block}.sidebar{width:100%;padding:8px 0}.sidebar-header{margin:0;padding:8px 16px}.sidebar-links{display:flex;overflow:auto}.nav-item{white-space:nowrap;padding:10px}.main{padding:18px}.form-row{grid-template-columns:1fr}}
.demo-notice{background:#fff3d9;border-left:3px solid var(--primary);padding:12px 16px;margin:15px 0;font-size:13px}
.source-footer{font-size:12px;color:var(--text-muted);padding:20px 0}.source-footer a{color:var(--primary)}
.moc-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:20px 0}.moc-grid .stat-card{min-height:115px}
.moc-two{display:grid;grid-template-columns:minmax(290px,.9fr) minmax(0,1.3fr);gap:18px}.moc-two .card{min-width:0}
.moc-entry{padding:13px 0;border-top:1px solid var(--border)}.moc-entry strong{display:block}.moc-entry small{color:var(--text-muted)}
.moc-entry button{margin-top:8px}.moc-stage{color:var(--primary);font-size:12px;font-weight:700}
@media(max-width:860px){.moc-two{grid-template-columns:1fr}}@media(max-width:560px){.moc-grid{grid-template-columns:1fr}}
