/* Clinical Pathway Helper - Modern UI */
.cph-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  font-family: 'Segoe UI', Arial, sans-serif;
}
.cph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}
.cph-card {
  background: #181f2a;
  color: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  border: 1px solid #232b3a;
}
.cph-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  border-color: #0078d7;
}
.cph-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.cph-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.cph-card-label {
  background: #0078d7;
  color: #fff;
  font-size: 0.95rem;
  padding: 0.25em 0.8em;
  border-radius: 12px;
  font-weight: 600;
  margin-left: 1rem;
}
.cph-card-desc {
  color: #bfc9db;
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
  min-height: 2.5em;
}
.cph-card-btn {
  background: #0078d7;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.7em 1.5em;
  font-size: 1.08rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: auto;
}
.cph-card-btn:hover {
  background: #005eb8;
}

/* Modal Styles */
.cph-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0; top: 0; right: 0; bottom: 0;
  align-items: center;
  justify-content: center;
}
.cph-modal.active {
  display: flex;
}
.cph-modal-backdrop {
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(20, 24, 34, 0.75);
  z-index: 1;
}
.cph-modal-content {
  position: relative;
  z-index: 2;
  background: #232b3a;
  color: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  max-width: 1200px;
  width: 98vw;
  padding: 2.2rem 2rem 1.5rem 2rem;
  animation: cphModalIn 0.2s cubic-bezier(.4,1.4,.6,1) 1;
}
@keyframes cphModalIn {
  from { transform: translateY(40px) scale(0.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.cph-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}
.cph-modal-title {
  font-size: 1.4rem;
  font-weight: 700;
}
.cph-modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.2em;
  border-radius: 50%;
  transition: background 0.15s;
}
.cph-modal-close:hover {
  background: #2d3a54;
}
.cph-modal-section {
  margin-bottom: 1.1rem;
  background: #1a2130;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  font-size: 1.07rem;
  color: #e3e8f0;
}
.cph-modal-section strong {
  color: #7ecfff;
  font-weight: 600;
  font-size: 1.08em;
}
.cph-modal-tabs {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap; /* Allow tabs to wrap to new lines on desktop */
  justify-content: flex-start;
  border-bottom: 2px solid #232b3a;
  padding-bottom: 0.2rem;
  overflow-x: visible; /* Remove horizontal scroll */
  scrollbar-width: none;
}
.cph-modal-tabs::-webkit-scrollbar { display: none; }

.cph-tab-btn {
  background: #232b3a;
  color: #7ecfff;
  border: none;
  border-radius: 999px 999px 0 0;
  padding: 0.7em 1.7em;
  font-size: 1.08rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  margin-bottom: -2px;
  position: relative;
  outline: none;
  box-shadow: none;
  white-space: nowrap;
}
.cph-tab-btn.active, .cph-tab-btn:focus {
  background: #27324a;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,120,215,0.10);
  z-index: 2;
}
.cph-tab-btn.active::after {
  content: '';
  display: block;
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -8px;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #00b4ff 0%, #0078d7 100%);
}
.cph-tab-btn:hover:not(.active) {
  background: #1a2130;
  color: #bfe6ff;
}
.cph-modal-tab-content {
  background: none;
  border-radius: 0 0 10px 10px;
}
.cph-tab-content {
  display: none;
  padding: 1.1rem 0.5rem 0.5rem 0.5rem;
  background: #1a2130;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  color: #e3e8f0;
  font-size: 1.07rem;
}
.cph-tab-content.active {
  display: block;
}
.cph-subtitle {
  display: block;
  font-size: 1.13em;
  font-weight: 700;
  color: #7ecfff;
  margin: 1.2em 0 0.5em 0;
  letter-spacing: 0.01em;
}
@media (max-width: 700px) {
  .cph-modal-content { max-width: 99vw; padding: 1.2rem 0.5rem; }
  .cph-modal-tabs {
    flex-direction: column;
    gap: 0.3rem;
    border-bottom: none;
    border-right: 2px solid #232b3a;
    padding-bottom: 0;
    padding-right: 0.2rem;
  }
  .cph-tab-btn {
    border-radius: 999px 0 0 999px;
    margin-bottom: 0;
    margin-right: -2px;
    width: 100%;
    text-align: left;
  }
  .cph-tab-btn.active, .cph-tab-btn:focus {
    background: #27324a;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,120,215,0.10);
    z-index: 2;
  }
  .cph-tab-btn.active::after {
    content: '';
    display: block;
    position: absolute;
    left: auto;
    right: -8px;
    top: 20%;
    bottom: 20%;
    width: 6px;
    height: 60%;
    border-radius: 3px;
    background: linear-gradient(180deg, #00b4ff 0%, #0078d7 100%);
  }
}