/* ===== Global Layout ===== */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #000962;
    color: #333;
    /* flex-direction: column;*/
   /* align-items: center; */
}
#maincre {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #000962;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center; 
}
  
h1, h2 {
    color: #f0f2f5;
    text-align: center;
    margin: 20px 0 10px;
}
  
h3, h4 {
    color: #000962;
    margin: 10px 0;
}
gmp-map {
    display: block;
    width: 100%;
    height: 500px; /* or 100vh to take full height */
}
/* ===== Container Styles ===== */
.base-container,
.table-container,
#chatgpt,
fieldset,
.section-box {
    box-sizing: border-box;
    max-width: 1500px;
    
    width: 96%;
    margin: 10px auto;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
}
  
.table-container {
    min-height: 300px;
    max-height: 480px;  /* 15 × 32px */
    overflow-y: auto;
    overflow: auto;
}
  
.base-grid {
      display: grid;
      grid-template-columns: minmax(300px, 40%) 1fr;
      gap: 16px;
      padding: 16px;
       background-color: #f9f9f9;
      border: 1px solid #ddd;
      border-radius: 8px;
    }
.card {
      background: #fff;
      border-radius: 12px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.08);
      padding: 12px 14px;
      display: flex;
      flex-direction: column;
      height: 100%;
    }    
/* ===== Forms and Inputs ===== */
input[type="text"],
input[type="number"],
input[type="date"],
textarea,
select
{
    font-size: 13px;
    line-height: 1.5;
    padding: 6px 8px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    width: 100%;
    box-sizing: border-box;
}
  
textarea {
    min-height: 100px;
    resize: vertical;
    overflow: auto;
}
  
button {
    background-color: #1616b5;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
  
button:hover {
    background-color: #0056b3;
}
table button {
    width: auto;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    line-height: 1;
}
/* ===== Table Styles ===== */
table {
    /* width: 100%; */
    border-collapse: collapse;
}
  
th, td {
    font-size: 12px;
    padding: 8px;
    border: 1px solid #ddd;
    text-align: center;
}
  
th {
    background-color: #8686d4;
    color: white;
}
  
tr:nth-child(even) {
    background-color: #f2f2f2;
}
tr.selected {
      background: #c6deee;
    }
  
/* ===== Chat Styles ===== */
#chat-container {
    width: 100%;
    max-height: 300px;
    overflow: auto;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
}
  
.chatQues,
.chatAnswer {
    min-height: 60px;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    word-wrap: break-word;
    max-width: 85%;
}
  
.chatQues {
    background-color: #dcebf1;
    float: left;
    clear: both;
}
  
.chatAnswer {
    background-color: #e3f1dc;
    float: right;
    clear: both;
}
  
#chat-history::after {
    content: "";
    display: block;
    clear: both;
}
.radio-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
}
  
.radio-group label {
    display: flex;
    /* align-items: center; */
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    width: 100%;  
}
.radio-group * {
    text-align: left !important;
   /* justify-content: flex-start !important; */
}
.check-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
}
  
.check-group label {
    display: inline-flex;
    align-items: left; 
    text-align: left;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    width: auto;  
}
.check-group * {
    text-align: left !important;
   /* justify-content: flex-start !important; */
}
/* ===== Navbar ===== */
/* ===== NAVBAR ===== */
.navbar {
    display: flex; 
    justify-content: center; /* Center links */
    align-items: center;
    background-color: #000962; /* CREnetics blue */
    padding: 10px 20px;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
   /* display: block;
    position: relative;
    z-index: 1000; */
}
  
.navbar a {
    color: white;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    font-weight: 500;
    margin-right: 15px;
}
  
.navbar a:hover {
    background-color: #0056b3; /* Slightly lighter blue */
}
  
/* Dropdown Support */
.dropdown {
    position: relative;
}
  
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}
  
.dropdown-content a {
    color: #333;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
}
  
.dropdown-content a:hover {
    background-color: #f1f1f1;
}
  
.dropdown:hover .dropdown-content {
    display: block;
}
/* ===== FOOTER ===== */
footer {
    width: 100%;
    text-align: center;
    color: white;
    background-color: #000962;
    padding: 15px 20px;
    font-size: 12px;
    margin-top: 40px;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}


/* ===== Proprent Section ===== */
.section-box {
  width: 100%;
  max-width: 1000px;
  margin: 30px auto;
  padding: 20px 30px;
  background-color: #ffffff;
  border-radius: 10px;
  border: 1px solid #ddd;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
  
#proprent-section h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #1616b5;
}
  
#proprent-section form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-start;
    justify-content: space-between;
}
  
#proprent-section label {
    font-weight: 500;
    color: #333;
}
  
#proprent-section input,
#proprent-section select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    max-width: 300px;
    box-sizing: border-box;
}
  
#proprent-section button {
    background-color: #1616b5;
    color: white;
    border: none;
    padding: 10px 20px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}
  
#proprent-section button:hover {
    background-color: #0056b3;
}
  
@media (max-width: 768px) {
    #proprent-section form {
      flex-direction: column;
    }
  
    #proprent-section input,
    #proprent-section select {
      max-width: 100%;
    }
}
.address-map-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    width: 96%;
    max-width: 1500px;
    margin: 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    box-sizing: border-box;
  }
  
  .address-panel {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .address-panel input,
  .address-panel button {
    width: 95%;
    padding: 8px;
    font-size: 14px;
    border-radius: 5px;
    border: 1px solid #ccc;
  }
  #messageBox {
    background-color: #fef9c3;
  color: #92400e;
  
  }
  #map {
    flex: 2;
    min-width: 400px;
    height: 800px;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-sizing: border-box;
  }

  
  .half-input {
    flex: 1;
  }

  #propertyTable tr.highlight {
    background-color: #d2ebff;
    font-weight: bold;
  }
  img {
    max-width: 100%;
    margin-top: 10px;
  }
  .hidden {
    display: none;
  }
  .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
  .checkbox-item {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    white-space: nowrap;
    padding: 2px 4px; /* Add horizontal padding */
    /* border: 1px solid #ddd; */
    min-width: 0px;
    /* border-radius: 6px;
     box-sizing: border-box; */
    overflow: hidden;             /* Prevent overflow */
    flex-shrink: 0; 
    gap: 6px;              /* Prevent shrinking */
}

.checkbox-item input[type="checkbox"] {
    margin: 0;                  /* Kill native checkbox margin */
    padding: 0;                 /* Ensure no extra space */
    width: auto;
    flex-shrink: 0;
                 /* Prevent the checkbox from shrinking */
}

.asset-summary-grid {
  display: grid;
  grid-template-columns: 400px auto;
  gap: 8px 16px;
  max-width: 1200px;
  padding: 16px;
  border: 1px solid #ccc;
  border-radius: 10px;
  background: #fdfdfd;
  margin: 16px 0 32px 0;
}

.asset-summary-grid .section-title {
  grid-column: 1 / -1;
  font-weight: bold;
  background: #f3f3f3;
  padding: 6px;
  font-size: 1.1em;
  margin-top: 12px;
  color: #333;
}
  .section-title {
    grid-column: 1 / -1;
    font-weight: bold;
    background: #f3f3f3;
    padding: 6px;
    margin-top: 12px;
  }


   .grid { display:grid; grid-template-columns:150px 1fr; gap:6px 12px; }
    .grid div:nth-child(odd) { font-weight:bold; }
    .red { background:#ffd6d6; }
    .grid-container {
      display: grid;
    grid-template-columns: 200px 1fr;
    gap: 8px 16px;
    max-width: 400px;
    margin-bottom: 30px;
  }

  .property-detail-grid {
  display: grid;
  grid-template-columns: max-content auto;
  gap: 8px 16px;
  padding: 16px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fdfdfd;
  border: 1px solid #ccc;
  border-radius: 12px;
  margin: 12px 0;
}
.property-detail-grid .section-title {
  grid-column: 1 / span 2;
  font-weight: bold;
  font-size: 1.1em;
  margin-top: 12px;
  color: #333;
}

  .grid-table {
    display: grid;
    grid-template-columns: 200px 1fr;
    row-gap: 6px;
    column-gap: 10px;
  }
  td.right {
  text-align: right;
}

/* Ensures date fields align center */
td.center {
  text-align: center;
}


/* Optional: consistent width for the field label column */
#propertyGrid td:first-child {
  font-weight: bold;
  background: #fafafa;
  width: 200px;
  white-space: nowrap;
}

.hidden {
  display: none;
}
/* setup for TABS */

.tabs {
  display: flex;
  gap: 8px;
  margin: 1rem 0;
  border-bottom: 2px solid #ccc;
}

.tab-btn {
  background:#f0f0f3;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 16px;
  color:#0056b3;
  border-radius: 6px 6px 0 0;
  transition: background 0.2s ease;
}

.tab-btn:hover {
  background: #e6e6e6;
}

.tab-btn.active {
  background: #6470b3;
  color: white;
  font-weight: bold;
}

.tab-panel {
  display: none;
  padding: 1rem;
  background: #f9f9f9;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 6px 6px;
}

.tab-panel.active {
  display: block;
}
#acsModal {
  display: none; /* hidden by default */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  max-width: 800px;
  max-height: 80%;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
  z-index: 1000;
  overflow: hidden;
  font-family: Arial, sans-serif;
}

/* draggable header */
#acsModalHeader {
  cursor: move;
  padding: 12px 20px;
  background: #007bff;
  color: #fff;
  font-size: 18px;
  border-radius: 10px 10px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#acsModalHeader button {
  background: transparent;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

#acsContent {
  padding: 20px;
  max-height: 60vh; /* scrollable content */
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.5;
}

#acsModal section {
  margin-bottom: 15px;
}

#acsModal h4 {
  margin: 10px 0;
  font-size: 16px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 4px;
  color: #333;
}

#acsModal ul {
  list-style: none;
  padding-left: 0;
  margin: 5px 0 0 0;
}

#acsModal ul li {
  margin: 4px 0;
  padding: 3px 0;
  border-bottom: 1px dashed #eee;
  font-size: 14px;
}

/* Dimmed background overlay */
#acsOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}
/* === ACS Modal Content Styling === */
#acsContent {
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

#acsContent .acs-section {
  margin-bottom: 20px;
}

#acsContent h4 {
  margin: 10px 0;
  font-size: 16px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 4px;
  color: #333;
}

#acsContent ul {
  list-style: none;
  padding-left: 0;
  margin: 5px 0 0 0;
}

#acsContent ul li {
  margin: 4px 0;
  padding: 3px 0;
  border-bottom: 1px dashed #eee;
}

/* Scrollable box for grouped data */
#acsContent .acs-scrollbox {
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 15px;
  background: #fafafa;
}

/* Disclaimer text */
#acsContent .acs-disclaimer {
  font-size: 12px;
  color: #666;
  margin-top: 10px;
  font-style: italic;
}

.override-input {
  width: 150px;
  max-width: 200px; /* keep responsive */
  padding: 4px 6px;
  font-size: 0.9rem;
}
.override-small {
  width: 100px;
}

.two-col {
  display: flex;
  gap: 1rem;          /* space between */
}
.two-col .col {
  flex: 1;            /* each takes half */
  padding: 1rem;
  border: 1px solid #ccc;
}

.chart-container {
  width: 100%;       /* full width of parent */
  max-width: 1200px; /* cap if you don’t want it too wide */
  margin: 20px auto; /* center it */
}

.chart-container canvas {
  width: 100% !important;
  height: 400px !important; /* taller if needed */
}

.login-wrapper {
      width: 100%;
      max-width: 380px; /* limit width for large screens */
      background: #fff;
      padding: 2rem;
      border-radius: 12px;
      box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
      text-align: center;
    }

    .login-wrapper h2 {
      color: #1a73e8;
      margin-bottom: 1.2rem;
      font-weight: 600;
    }

.ai-chat-header {
    background: #f9fafb;
    border: 1px solid #ccc;
    border-radius: 12px;
    padding: 15px;
    margin: 20px 0;
    height: 20vh;  /* about 20% of viewport height */
    overflow-y: auto;
    font-family: 'Roboto', sans-serif;
  }
  .ai-chat-header button {
    margin-top: 10px;
    margin-right: 8px;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: #0077cc;
    color: #fff;
    cursor: pointer;
  }
  .ai-chat-header button:hover {
    background: #005fa3;
  }

    .ai-input-row {
  display: flex;
  align-items: center;
  margin-top: 10px;
  gap: 8px;
}
.ai-input-row textarea {
  flex: 1;
  resize: none;
  font-size: 14px;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-family: 'Roboto', sans-serif;
}
.ai-input-row button {
  height: 100%;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: #0077cc;
  color: white;
  cursor: pointer;
}
.ai-input-row button:hover {
  background: #005fa3;
}

label {
      display: block;
      font-size: 12px;
      margin-top: 6px;
      margin-bottom: 2px;
      color: #374151;
    }

.field-row-inline {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .small-text {
      font-size: 11px;
      color: #6b7280;
    }
    .badge {
      display: inline-block;
      padding: 2px 6px;
      border-radius: 999px;
      font-size: 11px;
      background: #e5e7eb;
      color: #374151;
    }
    .badge-sale { background: #f97316; color: #fff; }
    .badge-lease { background: #22c55e; color: #fff; }
    .badge-assessment { background: #6366f1; color: #fff; }
    .badge-note { background: #6b7280; color: #fff; }
    .badge-file { background: #0ea5e9; color: #fff; }
    .message {
      font-size: 12px;
      margin-top: 4px;
    }
    .message.error { color: #b91c1c; }
    .message.success { color: #15803d; }

    .chart-wrap-wide {
      height: 500px;
      max-height: 500px;
      position: relative;
    }

/* ---- Model Data (compact) ---- */
.md-wrap { font-size: 12px; color:#111827; }
.md-sub { color:#6b7280; font-size: 11px; margin: 4px 0 10px; }

.md-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0;
  background: #fff;
}

.md-head {
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  align-items:baseline;
}
.md-title { font-weight: 800; font-size: 13px; }
.md-key { color:#9ca3af; font-size: 11px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.md-meta { margin-top: 6px; color:#6b7280; font-size: 11px; }
.md-meta b { color:#111827; font-weight: 700; }

.md-row { margin-top: 10px; }
.md-row > .lbl { color:#6b7280; font-size: 11px; margin-bottom: 4px; }
.md-row > .val { color:#111827; font-weight: 600; }

.md-grid {
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.md-pill {
  border:1px solid #eef2f7;
  background:#fafafa;
  border-radius: 10px;
  padding: 8px;
}
.md-pill .k { color:#6b7280; font-size: 10.5px; }
.md-pill .v { font-weight: 700; margin-top: 2px; }

.md-details { margin-top: 10px; }
.md-details summary { cursor:pointer; color:#374151; font-weight: 700; font-size: 11.5px; }
.md-details .md-box {
  margin-top: 8px;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  padding: 10px;
  background: #fafafa;
}

.md-muted { color:#6b7280; font-weight: 500; }



/* ============================
   Diagnostics Panel - Light Theme
   ============================ */

:root{
  --diag-bg: #ffffff;
  --diag-card: #f8fafc;
  --diag-border: #e5e7eb;
  --diag-text: #111827;
  --diag-muted: #6b7280;
  --diag-accent: #2563eb;
  --diag-accent-soft: #dbeafe;
  --diag-green: #059669;
  --diag-shadow: 0 4px 18px rgba(0,0,0,.06);
}

.diag-panel{
  background: var(--diag-bg);
  border: 1px solid var(--diag-border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--diag-shadow);
  color: var(--diag-text);
}

.diag-title{
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .2px;
}

/* Layout stack */
.diag-stack{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Rows */
.diag-row{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--diag-card);
  border: 1px solid var(--diag-border);
  border-radius: 12px;
}

.diag-label-strong{
  font-weight: 600;
  min-width: 100px;
}

.diag-hint{
  color: var(--diag-muted);
  font-size: 12px;
}

.diag-spacer{
  margin-left: auto;
}

/* Inputs */
.diag-select,
.diag-select-sm,
.diag-input-num{
  background: #ffffff;
  border: 1px solid var(--diag-border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--diag-text);
}

.diag-select{ min-width: 200px; }
.diag-select-sm{ min-width: 150px; }
.diag-input-num{ width: 120px; }

.diag-select:focus,
.diag-select-sm:focus,
.diag-input-num:focus{
  outline: none;
  border-color: var(--diag-accent);
  box-shadow: 0 0 0 3px var(--diag-accent-soft);
}

/* Toggle */
.diag-toggle{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--diag-muted);
}

.diag-toggle input{
  accent-color: var(--diag-accent);
}

/* Buttons */
#btnRunBacktest,
#btnSendRecsToConfig,
#pkgExpandAll,
#pkgCollapseAll{
  border: 1px solid var(--diag-border);
  background: var(--diag-accent);
  color: white;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}

#btnRunBacktest:hover,
#pkgExpandAll:hover,
#pkgCollapseAll:hover{
  opacity: .92;
  transform: translateY(-1px);
}

#btnSendRecsToConfig{
  background: var(--diag-green);
}

/* Chart */
.diag-chart-wrap{
  background: #ffffff;
  border: 1px solid var(--diag-border);
  border-radius: 12px;
  padding: 12px;
}

#wfChart{
  width: 100% !important;
  height: 280px !important;
}

/* Status */
.diag-status{
  font-size: 12px;
  color: var(--diag-muted);
  padding: 8px 10px;
  background: #f9fafb;
  border: 1px solid var(--diag-border);
  border-radius: 10px;
}

/* Summary grid */
.diag-grid-1{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 1200px){
  .diag-grid-1{
    grid-template-columns: 1fr;
  }
}

/* Raw JSON */
.diag-raw{
  max-height: 320px;
  overflow: auto;
  background: #f3f4f6;
  border: 1px solid var(--diag-border);
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ============================
   Package Browser
   ============================ */

.diag-debug{
  margin-top: 18px;
  background: #ffffff;
  border: 1px solid var(--diag-border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--diag-shadow);
}

.diag-debug-toolbar{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.diag-debug-toolbar select,
.diag-debug-search{
  border: 1px solid var(--diag-border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
}

.diag-debug-search{
  flex: 1 1 260px;
}

.diag-debug-grid{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.diag-card{
  background: #f9fafb;
  border: 1px solid var(--diag-border);
  border-radius: 10px;
  padding: 10px;
}

.diag-card-tree{
  flex: 1 1 420px;
  min-width: 300px;
  max-height: 420px;
  overflow: auto;
}

.diag-card-selected,
.diag-card-diff{
  max-height: 420px;
  overflow: auto;
  font-size: 12px;
  white-space: pre-wrap;
}

/* Walk-forward row spacing */
.diag-row-wf {
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* Number inputs */
.diag-input-num {
  width: 80px;
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #d0d5dd;
  background: #ffffff;
}

/* Stage / Chart dropdown */
.diag-select,
.diag-select-sm {
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #d0d5dd;
  background: #ffffff;
}

.diag-select-sm {
  min-width: 150px;
}

/* Main RUN button */
#btnRunBacktest {
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  background: #2563eb;
  color: white;
  cursor: pointer;
  transition: background 0.2s ease;
}

#btnRunBacktest:hover {
  background: #1d4ed8;
}

/* Toggle checkbox label */
.diag-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.flow-step { background-color: #f1f1f1;}