:root {
    --primary-color: #005691;
    --secondary-color: #f4f7f6;
    --text-color: #333;
    --access-color: #28a745;
    --watch-color: #ffc107;
    --reserve-color: #dc3545;
    --light-grey: #f0f0f0;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

header {
    background: var(--primary-color);
    color: #fff;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-size: 2rem;
}



#search-box, #pathogen-search-box {
width: 100%;
padding: 12px;
margin-bottom: 20px;
font-size: 1rem;
border-radius: 5px;
border: 1px solid #ccc;
box-sizing: border-box;
}

.filter-container {
background-color: #fff;
border-radius: 8px;
margin-bottom: 25px;
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
border: 1px solid #e0e0e0;
}

.collapsible {
background-color: #eef5f9;
color: var(--primary-color);
cursor: pointer;
padding: 15px 20px;
width: 100%;
border: none;
text-align: left;
outline: none;
font-size: 1.1rem;
font-weight: 600;
transition: background-color 0.3s ease;
border-radius: 8px 8px 0 0;
}

.collapsible:hover {
background-color: #dbeaf2;
}

.filter-panel {
padding: 0 20px;
max-height: 0;
overflow: hidden;
transition: max-height 0.4s ease-out, padding 0.4s ease-out;
background: #fff;
border-radius: 0 0 8px 8px;
}

.filter-panel.active {
padding: 20px;
}

.filter-panel fieldset {
border: none;
padding: 0;
margin: 0 0 15px 0;
}

.filter-panel legend {
font-size: 1rem;
font-weight: 600;
color: var(--primary-color);
padding-bottom: 10px;
width: 100%;
border-bottom: 1px solid var(--light-grey);
margin-bottom: 15px;
}

.filter-group {
display: flex;
flex-wrap: wrap;
gap: 12px 20px;
}

.filter-group label {
display: flex;
align-items: center;
cursor: pointer;
padding: 6px 10px;
transition: background-color 0.2s;
font-size: 0.95rem;
}

.filter-group input[type="checkbox"],
.filter-group input[type="radio"] {
margin-right: 8px;
transform: scale(1.1);
}

.conditions-container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
gap: 30px;
}

.condition-card {
background: #fff;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
overflow: hidden;
display: block;
transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.condition-card:hover {
transform: translateY(-5px);
box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.card-header {
background: var(--primary-color);
color: white;
padding: 15px 20px;
}

.card-header h3 {
margin: 0;
font-size: 1.4rem;
}

.card-body {
padding: 20px;
}

.tabs {
display: flex;
border-bottom: 2px solid var(--light-grey);
margin-bottom: 20px;
}

.tab {
padding: 10px 20px;
cursor: pointer;
font-weight: 600;
color: #888;
border-bottom: 3px solid transparent;
}

.tab.active {
color: var(--primary-color);
border-bottom: 3px solid var(--primary-color);
}

.tab-content {
display: none;
}

.tab-content.active {
display: block;
}

.treatment-section {
margin-bottom: 25px;
}

.treatment-section h4 {
color: var(--primary-color);
border-bottom: 2px solid var(--light-grey);
padding-bottom: 8px;
margin-top: 0;
font-size: 1.2rem;
}

.no-antibiotic {
background: #fffbe6;
border: 1px solid \#ffe58f;
padding: 15px;
border-radius: 5px;
font-weight: 500;
}

.antibiotic-item {
display: flex;
align-items: center;
gap: 15px;
margin-bottom: 10px;
}

.aware-badge {
color: white;
padding: 3px 10px;
border-radius: 12px;
font-size: 0.8rem;
font-weight: 700;
flex-shrink: 0;
}

.Access { background-color: var(--access-color); }
.Watch { background-color: var(--watch-color); }
.Reserve { background-color: var(--reserve-color); }

.strategy {
background: var(--light-grey);
padding: 15px;
border-radius: 5px;
margin-top: 10px;
}
.strategy h5 {
margin: 0 0 10px 0;
font-size: 1rem;
color: #333;
}
.de-escalation h5 { color: #1e87f0; }
.escalation h5 { color: #d83a3a; }

.hidden {
display: none !important;
}

.setting-title {
margin-top: 40px;
margin-bottom: 20px;
font-size: 1.8rem;
color: var(--primary-color);
border-bottom: 3px solid var(--primary-color);
padding-bottom: 10px;
}

#pathogen-results-container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
gap: 30px;
}

.pathogen-card {
background: #fff;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
overflow: hidden;
border-left: 5px solid var(--primary-color);
}

.pathogen-card .card-header {
background: #f7f9fa;
color: var(--primary-color);
}

.pathogen-card .card-body p.pathogen-description {
font-style: italic;
color: #555;
margin-top: 0;
border-bottom: 1px solid var(--light-grey);
padding-bottom: 15px;
}

.pathogen-card .treatment-section h4 {
font-size: 1.1rem;
}

.pathogen-card .antibiotic-item {
display: block;
margin-bottom: 15px;
}

.pathogen-card .antibiotic-item strong {
font-weight: 600;
}

.pathogen-card .antibiotic-item .note {
font-size: 0.9rem;
color: #666;
padding-left: 10px;
border-left: 2px solid \#eee;
margin-top: 4px;
display: block;
}

.iv-po-guidance {
margin-top: 25px;
padding: 15px;
background-color: #f8f9fa;
border-left: 4px solid \#6c757d;
border-radius: 0 4px 4px 0;
}

.iv-po-guidance h4 {
margin-top: 0;
margin-bottom: 8px;
color: #495057;
font-size: 1.1rem;
}

.iv-po-guidance p {
margin: 0;
font-size: 0.95rem;
color: #343a40;
}

.pathogen-card .overall-notes {
background-color: #eef5f9;
padding: 15px;
border-radius: 5px;
font-size: 0.95rem;
margin-top: 20px;
}

.diagnostic-form {
background: #fff;
padding: 25px;
border-radius: 8px;
margin-bottom: 30px;
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.diagnostic-form .form-group {
margin: 0;
}

.diagnostic-form label {
font-size: 1.1rem;
font-weight: 600;
margin-bottom: 10px;
display: block;
}

#syndrome-select {
width: 100%;
padding: 12px;
font-size: 1rem;
border-radius: 5px;
border: 1px solid #ccc;
}

.diagnostic-results-card {
background: #fff;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
overflow: hidden;
}

.diagnostic-results-card .card-header {
background-color: #f7f9fa;
color: var(--primary-color);
border-bottom: 1px solid \#e0e0e0;
}

.diagnostic-results-card .card-body {
padding: 0;
}

.diagnostic-section {
padding: 20px;
border-bottom: 1px solid #eee;
}
.diagnostic-section:last-child {
border-bottom: none;
}

.diagnostic-section h4 {
margin: 0 0 15px 0;
font-size: 1.2rem;
}

.diagnostic-section h4.essential { color: var(--danger-color); }
.diagnostic-section h4.consider { color: var(--watch-color); }
.diagnostic-section h4.specialized { color: var(--info-color); }

.diagnostic-item {
margin-bottom: 15px;
}
.diagnostic-item:last-child {
margin-bottom: 0;
}

.diagnostic-item strong {
display: block;
font-weight: 600;
}

.diagnostic-item .rationale {
font-size: 0.9rem;
color: #666;
padding-left: 10px;
border-left: 2px solid #eee;
margin-top: 4px;
}
/* On narrow phones: one‑column cards */
@media (max-width: 575.98px) {
  .conditions-container,
  .pathogens-container,
  .diagnostics-container {
    /* force single column */
    grid-template-columns: 1fr !important;
    gap: 15px;
  }

  /* Make tab buttons wrap & fill width */
  .main-tabs {
    display: flex;
    flex-wrap: wrap;
  }
  .main-tab-btn {
    flex: 1 1 100%;
    text-align: center;
    margin-bottom: 8px;
  }

  /* Tighter padding for filter panel */
  .filter-panel {
    padding: 10px !important;
  }
}

/* On small tablets: two‑column cards */
@media (min-width: 576px) and (max-width: 767.98px) {
  .conditions-container,
  .pathogens-container,
  .diagnostics-container {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  }
}

/* Slight tweak for medium screens */
@media (min-width: 768px) and (max-width: 991.98px) {
  .conditions-container,
  .pathogens-container,
  .diagnostics-container {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
  }
}

/* -----------------------------------
   TOUCH‑FRIENDLY BUTTONS & INPUTS
   ----------------------------------- */
@media (max-width: 767.98px) {
  button, .main-tab-btn, input {
    min-height: 48px;
    font-size: 1.05rem;
  }
}

/* -----------------------------------
   ENSURE COLLAPSED FILTERS EXPAND FULLY
   ----------------------------------- */
.filter-panel.collapse.show {
  max-height: none !important;
  overflow: visible !important;
}


