/* NABH DHS Readiness Program Styles */
:root {
  --primary: #1a6b3a;
  --primary-dark: #0f4620;
  --primary-light: #e8f5e9;
  --secondary: #d4881c;
  --danger: #e74c3c;
  --success: #27ae60;
  --warning: #f39c12;
  --info: #3498db;
  --light: #ecf0f1;
  --dark: #2c3e50;
  --text: #34495e;
  --text-light: #7f8c8d;
  --muted: #95a5a6;
  --border: #bdc3c7;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-lg: rgba(0, 0, 0, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text);
  background: #fafbfc;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 40px 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  text-align: center;
}

header h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
}

header p {
  font-size: 1.1em;
  opacity: 0.9;
}

main {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

section {
  margin-bottom: 50px;
}

section:last-child {
  margin-bottom: 0;
}

section h2 {
  font-size: 1.8em;
  color: var(--primary);
  margin-bottom: 20px;
  border-bottom: 3px solid var(--primary);
  padding-bottom: 10px;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(26, 107, 58, 0.2);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(26, 107, 58, 0.3);
}

.btn-secondary {
  background: white;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-secondary:hover {
  background: white;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 40px 0;
  margin-bottom: 50px;
}

.hero h2 {
  font-size: 2.2em;
  margin-bottom: 15px;
  border: none;
}

.hero p {
  font-size: 1.2em;
  color: #7f8c8d;
  margin-bottom: 30px;
}

.cta-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.feature-card {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card h3 {
  color: var(--primary);
  margin-bottom: 10px;
}

/* Forms */
form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.question {
  padding: 25px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  display: none;
}

.question.active {
  display: block;
  animation: slideIn 0.3s;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.question h3 {
  color: var(--primary);
  margin-bottom: 15px;
  font-size: 1.1em;
}

.question label {
  display: block;
  margin: 10px 0 5px;
  font-weight: 500;
}

.question input[type="text"],
.question input[type="email"],
.question input[type="date"],
.question select,
.question textarea {
  width: 100%;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 1em;
  font-family: inherit;
  margin-bottom: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.question input[type="date"]:focus,
.question select:focus,
.question textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 107, 58, 0.1);
}

.question select {
  cursor: pointer;
}

.question input[type="checkbox"],
.question input[type="radio"] {
  margin-right: 8px;
  cursor: pointer;
}

.option {
  margin: 12px 0;
  padding: 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.option:hover {
  border-color: var(--primary);
  background: rgba(26, 107, 58, 0.05);
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 30px;
  background: #e0e0e0;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 30px;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--success));
  width: 0%;
  transition: width 0.3s;
}

#progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 0.9em;
}

/* Messages */
.message {
  padding: 15px 20px;
  border-radius: 4px;
  margin: 15px 0;
  border-left: 4px solid;
}

.message.success {
  background: #d4edda;
  border-color: var(--success);
  color: #155724;
}

.message.error {
  background: #f8d7da;
  border-color: var(--danger);
  color: #721c24;
}

.message.info {
  background: #d1ecf1;
  border-color: var(--info);
  color: #0c5460;
}

/* Roadmap */
.roadmap-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.metric {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  border: 2px solid var(--light);
}

.metric h3 {
  color: #7f8c8d;
  font-size: 0.9em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.metric p {
  font-size: 1.8em;
  font-weight: bold;
  color: var(--primary);
}

.badge {
  display: inline-block;
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9em;
}

.badge.critical {
  background: #f8d7da;
  color: var(--danger);
}

.badge.high {
  background: #fff3cd;
  color: #856404;
}

.badge.medium {
  background: #d1ecf1;
  color: #0c5460;
}

.badge.low {
  background: #d4edda;
  color: #155724;
}

.badge.emergency {
  background: var(--danger);
  color: white;
}

.badge.intensive {
  background: var(--warning);
  color: white;
}

.badge.moderate {
  background: var(--info);
  color: white;
}

.badge.relaxed {
  background: var(--success);
  color: white;
}

/* Risk Grid */
.risk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.risk-item {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 4px;
  border-left: 4px solid;
}

.risk-item h4 {
  margin-bottom: 10px;
  color: var(--primary);
}

.risk-bar {
  width: 100%;
  height: 20px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}

.risk-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success), var(--warning), var(--danger));
  transition: width 0.3s;
}

/* Weekly Plan */
.week-card {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  background: #f8f9fa;
}

.week-header {
  background: var(--primary);
  color: white;
  padding: 15px;
  margin: -20px -20px 15px -20px;
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.week-number {
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 12px;
  border-radius: 4px;
  font-weight: bold;
  white-space: nowrap;
  font-size: 0.95em;
}

.week-info h3 {
  margin: 0;
  font-size: 1.3em;
}

.week-info p {
  margin: 5px 0 0;
  opacity: 0.9;
  font-size: 0.9em;
}

.tasks-list {
  list-style: none;
}

.task-item {
  padding: 12px 15px;
  margin: 10px 0;
  background: white;
  border-left: 4px solid;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.priority-icon {
  font-size: 1.2em;
  flex-shrink: 0;
}

.task-text {
  flex: 1;
}

.task-item.critical {
  border-color: var(--danger);
}

.task-item.high {
  border-color: var(--warning);
}

.task-item.medium {
  border-color: var(--info);
}

.task-priority {
  font-size: 0.8em;
  font-weight: bold;
  padding: 4px 12px;
  border-radius: 20px;
}

.task-priority.critical {
  background: #f8d7da;
  color: var(--danger);
}

.task-priority.high {
  background: #fff3cd;
  color: #856404;
}

.task-priority.medium {
  background: #d1ecf1;
  color: #0c5460;
}

/* Resource Cards */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.resource-card {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
}

.resource-card:hover {
  box-shadow: 0 4px 12px rgba(26, 107, 58, 0.1);
  border-color: var(--primary);
}

.resource-card h4 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 1.1em;
}

.resource-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}
}

/* Critical Path */
#critical-items {
  list-style: none;
}

#critical-items li {
  padding: 15px;
  margin: 10px 0;
  background: #ffeaa7;
  border-left: 4px solid var(--warning);
  border-radius: 4px;
  font-weight: 500;
}

/* Resources */
#resource-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.resource-card {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid var(--border);
}

.resource-card h4 {
  color: var(--primary);
  margin-bottom: 15px;
}

.resource-card ul {
  list-style: none;
}

.resource-card li {
  padding: 8px 0;
  border-bottom: 1px solid var(--light);
}

.resource-card li:last-child {
  border: none;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}

/* Footer */
footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 60px;
  background: #f8f9fa;
  font-size: 0.9em;
}

footer p {
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.8em;
  }

  main {
    padding: 20px;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .roadmap-overview {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

/* Hospital Dashboard */
.dashboard-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.kpis-section h2,
.risk-section h2,
.progress-section h2,
.critical-section h2,
.update-section h2 {
  font-size: 1.6em;
  color: var(--primary);
  margin-bottom: 20px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 10px;
}

.kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.kpi-card {
  background: white;
  border: 2px solid var(--light);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.kpi-card h3 {
  font-size: 0.9em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 15px;
}

.kpi-value {
  font-size: 2.5em;
  font-weight: bold;
  color: var(--primary);
  margin: 10px 0;
}

.kpi-value.risk-status {
  font-size: 2em;
  padding: 10px;
  border-radius: 4px;
}

.kpi-value.risk-status.low {
  background: #d4edda;
  color: #155724;
}

.kpi-value.risk-status.medium {
  background: #fff3cd;
  color: #856404;
}

.kpi-value.risk-status.high {
  background: #f8d7da;
  color: #721c24;
}

.kpi-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.85em;
}

.kpi-badge.emergency {
  background: #f8d7da;
  color: var(--danger);
}

.kpi-badge.intensive {
  background: #fff3cd;
  color: #856404;
}

.kpi-badge.moderate {
  background: #d1ecf1;
  color: #0c5460;
}

.kpi-badge.relaxed {
  background: #d4edda;
  color: #155724;
}

.kpi-bar {
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin: 10px 0;
}

.kpi-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success), var(--warning));
  transition: width 0.3s;
}

.kpi-label {
  font-size: 0.85em;
  color: var(--muted);
  margin: 10px 0 0;
}

/* Risk Dimensions */
.risk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 40px;
}

.dimension-card {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  transition: all 0.3s;
}

.dimension-card.low {
  border-color: var(--success);
  background: rgba(39, 174, 96, 0.05);
}

.dimension-card.medium {
  border-color: var(--warning);
  background: rgba(243, 156, 18, 0.05);
}

.dimension-card.high {
  border-color: var(--danger);
  background: rgba(192, 57, 43, 0.05);
}

.dimension-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.dimension-icon {
  font-size: 1.5em;
}

.dimension-header h4 {
  margin: 0;
  font-size: 0.95em;
  color: var(--text);
}

.dimension-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dimension-bar {
  flex: 1;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.dimension-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success), var(--warning), var(--danger));
  transition: width 0.3s;
}

.dimension-percent {
  font-size: 0.85em;
  font-weight: bold;
  color: var(--text);
  min-width: 35px;
  text-align: right;
}

/* Weekly Progress */
.weeks-progress-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
  margin-bottom: 40px;
}

.week-progress-card {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  transition: all 0.3s;
}

.week-progress-card.completed {
  border-color: var(--success);
  background: rgba(39, 174, 96, 0.05);
}

.week-progress-card.in_progress {
  border-color: var(--info);
  background: rgba(52, 152, 219, 0.05);
}

.week-progress-card.at_risk {
  border-color: var(--warning);
  background: rgba(243, 156, 18, 0.05);
}

.week-progress-card.not_started {
  border-color: #bdc3c7;
  background: #f8f9fa;
}

.week-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.week-progress-header h4 {
  margin: 0;
  font-size: 1em;
  color: var(--text);
}

.status-badge {
  font-size: 0.85em;
  font-weight: bold;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.week-description {
  font-size: 0.9em;
  color: var(--muted);
  margin: 8px 0;
}

.week-progress-bar {
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
  margin: 10px 0;
}

.week-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success), var(--info));
  transition: width 0.3s;
}

.week-percent {
  font-size: 0.85em;
  font-weight: bold;
  color: var(--primary);
  margin: 8px 0 0;
}

.week-notes {
  font-size: 0.85em;
  color: var(--muted);
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid #e0e0e0;
}

/* Progress Form */
.progress-form {
  background: white;
  border: 2px solid var(--light);
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.95em;
  font-family: inherit;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.progress-form .btn {
  width: auto;
  margin-top: 10px;
}

/* Critical Tasks */
.critical-list {
  list-style: none;
  padding: 0;
}

.critical-item {
  padding: 12px 15px;
  background: white;
  border-left: 4px solid var(--danger);
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 0.95em;
}

/* Outcomes Section */
.outcomes-section {
  background: linear-gradient(135deg, var(--primary-light) 0%, rgba(232, 245, 233, 0.5) 100%);
  padding: 30px;
  border-radius: 12px;
  border: 2px solid var(--primary);
}

.outcomes-section h2 {
  border: none;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.outcomes-subtitle {
  color: var(--muted);
  font-size: 0.95em;
  margin-bottom: 25px;
}

.outcomes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.outcome-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
}

.outcome-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 107, 58, 0.12);
}

.outcome-icon {
  font-size: 2.5em;
  margin-bottom: 10px;
  display: block;
}

.outcome-card h4 {
  margin: 10px 0 5px;
  font-size: 0.9em;
  color: var(--text);
}

.outcome-value {
  font-size: 1.8em;
  font-weight: bold;
  color: var(--primary);
  margin: 8px 0;
}

.outcome-card p {
  font-size: 0.8em;
  color: var(--muted);
  margin: 0;
}

.ratings-section {
  background: white;
  padding: 25px;
  border-radius: 8px;
}

.ratings-section h3 {
  margin: 0 0 20px;
  color: var(--primary);
  font-size: 1.1em;
}

.ratings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.rating-item {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid var(--primary);
}

.rating-item h4 {
  margin: 0 0 8px;
  font-size: 0.9em;
  color: var(--text);
}

.rating-stars {
  font-size: 1.3em;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 8px;
}

.rating-bar {
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
}

.rating-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success), var(--primary));
  transition: width 0.3s;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .kpis-grid {
    grid-template-columns: 1fr;
  }

  .weeks-progress-container {
    grid-template-columns: 1fr;
  }

  .risk-grid {
    grid-template-columns: 1fr;
  }
}
