:root {
  --bg: #f6f7fb;
  --card-bg: #fff;
  --text-dark: #1f2937;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --accent: #3b82f6;
  --accent-2: #10b981;
  --pill-bg: #f1f5f9;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 2px 10px rgba(15, 23, 42, 0.06);
  --info-bg: #eff6ff;
  --info-border: #bfdbfe;
  --info-text: #0c4a6e;
  --notice-bg: #ecfeff;
  --notice-border: #bae6fd;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text-dark);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem;
}

.header {
  margin-bottom: 1.5rem;
}


h1 {
  font-size: 2rem; 
  font-weight: 700; 
  text-align: center; 
  margin: 0 auto 1.5rem;
  padding-bottom: 0.5rem; 
  border-bottom: 1px solid var(--border); 
  background: linear-gradient(45deg, #60a5fa, var(--accent));
  -webkit-background-clip: text; 
  background-clip: text;
  color: transparent; 
}

h2 {
  font-size: 1.25rem;
  margin: 0 0 1rem;
  font-weight: 600;
}

h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1rem;
}

.results {
  display: none; /* Hide the results card by default */
}

.results.show {
  display: block; /* A class to make it visible */
}

.content-grid {
  display: grid;
  gap: 1.5rem;
}

/* @media (min-width: 960px) {
  .content-grid {
    grid-template-columns: 1.1fr 1fr;
  }
} */

.info-box {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background-color: var(--info-bg);
  border: 1px solid var(--info-border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.info-box .icon {
  font-size: 1rem;
  flex-shrink: 0;
  padding-top: 2px;
}

.info-box p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--info-text);
}

.form-group {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

.field {
  flex: 1;
  min-width: 150px;
}

label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

select, input[type="number"] {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  background-color: var(--card-bg);
  min-height: 40px;
}

select:focus, input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: transparent;
}

.pill {
  display: inline-flex;
  background-color: var(--pill-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-dark);
  font-weight: 500;
  align-self: flex-end;
  height: min-content;
}

.divider {
  height: 1px;
  background-color: var(--border);
  margin: 1.25rem 0;
}

.member-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.member-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  background-color: var(--pill-bg);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-dark);
}

.select-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.button-group {
  display: flex;
  gap: 0.5rem;
  align-self: flex-end;
}

.btn {
  padding: 0.625rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: var(--card-bg);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
  min-width: 90px;
  text-align: center;
}

.btn:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(180deg, #60a5fa, #3b82f6);
  border-color: var(--accent);
  color: #fff;
}

.btn.primary:hover {
  background: linear-gradient(180deg, #3b82f6, #60a5fa);
}

.responsive-table {
  overflow-x: auto;
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th, td {
  padding: 0.75rem;
  border-bottom: 1px dashed var(--border);
  text-align: right;
  font-size: 0.8125rem;
}

th:first-child, td:first-child {
  text-align: left;
}

thead th {
  background-color: #f8fafc;
  font-size: 0.6875rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--text-muted);
  position: sticky;
  top: 0;
}

@media (max-width: 600px) {
  .responsive-table table {
    min-width: unset;
  }
  .responsive-table table, 
  .responsive-table thead, 
  .responsive-table tbody, 
  .responsive-table th, 
  .responsive-table td, 
  .responsive-table tr { 
    display: block; 
  }
  .responsive-table thead tr { 
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  .responsive-table tr {
    border: 1px solid var(--border);
    margin-bottom: 0.75rem;
    border-radius: 8px;
    padding: 0.5rem;
  }
  .responsive-table td {
    border: none;
    position: relative;
    padding-left: 50%;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .responsive-table td:before {
    position: absolute;
    left: 6px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    content: attr(data-label);
    color: var(--text-muted);
    font-weight: 500;
  }
  .responsive-table td:first-child {
    font-weight: 600;
    color: var(--text-dark);
    padding-left: 6px;
  }
  .responsive-table td:first-child:before {
    content: '';
  }
}

.results-summary {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.summary-box {
  background-color: var(--notice-bg);
  border: 1px solid var(--notice-border);
  padding: 0.75rem;
  border-radius: 8px;
  color: var(--info-text);
  font-size: 0.8125rem;
  font-weight: 600;
}

.muted {
  color: var(--text-muted);
}

.byline {
  text-align: center;
  font-size: 0.875rem; /* 14px */
  color: var(--text-muted);
  margin-top: -0.5rem; /* Tucks it up nicely under the main title */
  margin-bottom: 1.5rem;
}

.byline b {
  color: var(--text-dark); /* Makes the bolded name stand out a bit more */
}

.install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  z-index: 1000;
  transition: transform 0.3s ease-in-out;
  transform: translateY(100%);
  padding: 0.75rem 3rem 0.75rem 1rem;
}

.install-banner.active {
  transform: translateY(0);
}

.install-banner p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-dark);
}

.install-banner #install-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
}

#close-install-btn {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 1.75rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s ease-in-out;
}

#close-install-btn:hover {
  color: var(--text-dark);
}