.planner-container,
.planner-content,
.planner-main,
.planner-section {
  width: 100%;
  max-width: 100%;
}

.planner-content {
  gap: var(--opus-spacing-xs);
}

.planner-main {
  gap: var(--opus-spacing-xs);
}

.planner-section {
  padding: var(--opus-spacing-sm);
}

.planner-section-header {
  margin-bottom: var(--opus-spacing-sm);
}

#searchInput {
  padding-top: 4px;
  padding-bottom: 4px;
}

.csea-stats-grid {
  gap: 12px;
}

.csea-stat-card {
  padding: 10px;
}

.csea-summary-section {
  padding: var(--opus-spacing-xs);
}

.csea-summary-section .planner-section-header {
  margin-bottom: 6px;
}

.csea-summary-section .csea-stats-grid {
  gap: 8px;
}

.csea-summary-section .csea-stat-card {
  padding: 8px;
}

.csea-search-section {
  padding: var(--opus-spacing-xs);
}

.csea-search-section .planner-section-header {
  margin-bottom: 6px;
}

.csea-search-section #searchInput {
  padding-top: 3px;
  padding-bottom: 3px;
}

.csea-search-section .planner-section-content {
  margin-top: 4px;
}

.csea-table th,
.csea-table td {
  padding: 4px 6px;
  line-height: 1.2;
}

/* widen name column for readability */
.csea-table th:nth-child(2),
.csea-table td:nth-child(2) {
  min-width: 180px;
}

.csea-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: nowrap;
  width: 100%;
}

.csea-cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--opus-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: var(--opus-shadow-sm);
  border: 2px solid var(--opus-primary-dark);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.csea-cta-pill:hover {
  background: var(--opus-primary-light);
  border-color: var(--opus-primary);
  transform: translateY(-1px);
  box-shadow: var(--opus-shadow-md);
}

.csea-cta-pill:active {
  background: var(--opus-primary-dark);
  border-color: var(--opus-primary-dark);
  transform: translateY(0);
}

.csea-cta-pill:focus-visible {
  outline: 2px solid var(--opus-accent);
  outline-offset: 3px;
}

.planner-header {
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.planner-header-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

@media (min-width: 720px) {
  .planner-header {
    flex-direction: row;
    align-items: center;
  }

  .planner-header-right {
    width: auto;
    align-items: flex-end;
  }
}

/* legacy pill retained for other uses */
.member-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #0f4c75;
  color: #fff;
  font-weight: 700;
  box-shadow: var(--opus-shadow-sm);
  border: 2px solid #0b3a58;
  cursor: pointer;
}

.member-pill:hover {
  background: #0b3a58;
}

/* Conflict Alert Styles */
.conflict-alert-container {
  margin-bottom: var(--opus-spacing-sm);
  max-width: 500px;
}

.conflict-card {
  background: #2c2c2c;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  padding: 16px;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.conflict-accent-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #ff6b6b;
}

.conflict-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #99b3c5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  flex-shrink: 0;
}

.conflict-avatar i {
  font-size: 24px;
  color: #ffffff;
}

.conflict-content {
  flex-grow: 1;
}

.conflict-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 2px;
  line-height: 1.2;
}

.conflict-subtitle {
  color: #a0a0a0;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.conflict-datetime {
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.conflict-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.conflict-warning-icon {
  background: #ff4d4d;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.conflict-warning-text {
  font-weight: 700;
  font-size: 0.95rem;
}

.conflict-actions {
  display: flex;
  gap: 8px;
}

.conflict-btn {
  background: #444;
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.conflict-btn:hover {
  background: #555;
}

/* Grievance print styles */
.grievance-section {
  break-inside: avoid;
  page-break-inside: avoid;
}

@media print {
  .grievance-section:not(:last-of-type) {
    page-break-after: always;
    break-after: page;
  }

  body.printing-grievance .planner-container {
    display: none;
  }

  body.printing-grievance #grievance-modal {
    display: block !important;
    position: static;
    background: white;
    padding: 0;
  }

  body.printing-grievance #grievance-modal .grievance-shell {
    max-width: 100%;
    width: auto;
    box-shadow: none;
    border: none;
    border-radius: 0;
  }

  body.printing-grievance #grievance-modal .grievance-content {
    max-height: none;
    overflow: visible;
    background: white;
  }

  body.printing-grievance #grievance-modal .grievance-actions {
    display: none;
  }
}
