:root {
    --brand-green: #2d8c3c;
    --brand-green-light: #e8f5ea;
    --brand-green-dark: #1e5f28;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --border-light: #ccc;
    --border-medium: #d1d5db;
    --bg-surface: #f5f5f5;
    --bg-white: #ffffff;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.10), 0 4px 10px rgba(0, 0, 0, 0.05);
  }

  * { box-sizing: border-box; }


  .demo-wrap {
    max-width: 1200px;
    margin: 0 auto;
  }

  /* ===== Main search bar (matches existing site) ===== */
  .search-bar {
    display: grid;
    grid-template-columns: 1fr 1.3fr auto;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    overflow: hidden;
  }

  .search-field {
    padding: 12px 20px;
    border-right: 1px solid var(--border-light);
  }

  .search-field .label {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 2px;
  }

  .search-field input,
  .search-field select {
    border: none;
    padding: 4px 0;
    font-size: 14px;
    width: 100%;
    background: transparent;
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
  }

  .search-btn {
    background: var(--brand-green);
    color: white;
    border: none;
    padding: 0 36px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
  }
  .search-btn:hover { background: #256e30; }

  /* ===== Filters row ===== */
  .more-filters-toggle {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
  }

  .filters-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 12px;
    position: relative;
  }

  .filter-label {
    font-size: 12px;
    color: #7a7f8c !important;
    margin-bottom: 1px;
    text-transform: uppercase;
    font-weight: 700;
  }

  .filter-control {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 11px 16px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.15s;
    font-family: inherit;
    height: 56px;
  }
  .filter-control:hover { border-color: var(--border-medium); }

  .filter-control.is-active {
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(45, 140, 60, 0.12);
  }

  .filter-control .placeholder { color: var(--text-secondary); }

  /* ===== Date picker popover ===== */
  .date-popover {
    position: absolute;
    top: calc(100% + -25px);
    right: 30px;
    width: 680px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    display: none;
  }
  .date-popover.open { display: block; }

  .calendar-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .calendar-panel {
    padding: 20px;
  }
  .calendar-panel:first-child {
    border-right: 1px solid var(--border-light);
  }

  .calendar-header-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--brand-green);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 6px;
  }

  .selected-date-display {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    min-height: 22px;
  }
  .selected-date-display.empty {
    color: var(--text-tertiary);
    font-weight: 400;
  }

  .month-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
  }

  .month-nav-btn {
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    width: 28px;
    height: 28px;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
  }
  .month-nav-btn:hover { background: var(--bg-surface); color: var(--text-primary); }

  .month-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
  }

  .cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
  }

  .cal-dow {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-align: center;
    padding: 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.1s;
    user-select: none;
  }
  .cal-day:hover:not(.empty):not(.past):not(.disabled) {
    background: var(--brand-green-light);
    color: var(--brand-green-dark);
  }
  .cal-day.past,
  .cal-day.disabled {
    color: var(--text-tertiary);
    cursor: not-allowed;
    opacity: 0.35;
  }
  .cal-day.empty { cursor: default; }
  .cal-day.today {
    font-weight: 700;
    box-shadow: inset 0 0 0 1px var(--brand-green);
  }
  .cal-day.selected {
    background: var(--brand-green);
    color: white;
    font-weight: 600;
  }
  .cal-day.selected:hover {
    background: var(--brand-green) !important;
    color: white !important;
  }
  .cal-day.in-range {
    background: var(--brand-green-light);
    color: var(--brand-green-dark);
    border-radius: 0;
  }

  /* ===== Footer with presets + actions ===== */
  .picker-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-top: 1px solid var(--border-light);
    background: #fafafa;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    flex-wrap: wrap;
    gap: 10px;
  }

  .preset-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .preset-btn {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.15s;
    font-family: inherit;
  }
  .preset-btn:hover {
    background: var(--brand-green-light);
    border-color: var(--brand-green);
    color: var(--brand-green);
  }

  .action-group { display: flex; gap: 8px; }

  .btn-secondary,
  .btn-primary {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
  }

  .btn-secondary {
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
  }
  .btn-secondary:hover { background: var(--bg-surface); color: var(--text-primary); }

  .btn-primary {
    background: var(--brand-green);
    color: white;
    border: 1px solid var(--brand-green);
  }
  .btn-primary:hover { background: #256e30; border-color: #256e30; }
  .btn-primary:disabled {
    background: var(--border-medium);
    border-color: var(--border-medium);
    cursor: not-allowed;
  }

  /* ===== Mobile responsive ===== */
  @media (max-width: 768px) {
    .search-bar {
      grid-template-columns: 1fr;
    }
    .search-field {
      border-right: none;
      border-bottom: 1px solid var(--border-light);
    }
    .search-btn {
      padding: 14px;
      width: 100%;
    }
    .filters-row {
      grid-template-columns: 1fr;
    }
    .date-popover {
      width: calc(100vw - 40px);
      right: auto;
      left: 0;
      max-width: 400px;
    }
    .calendar-pair {
      grid-template-columns: 1fr;
    }
    .calendar-panel:first-child {
      border-right: none;
      border-bottom: 1px solid var(--border-light);
    }
    .picker-footer {
      flex-direction: column;
      align-items: stretch;
    }
    .action-group { justify-content: flex-end; }
  }