/* style.css */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f6f8;
  color: #222;
}

.container {
  max-width: 750px;
  margin: 40px auto;
  padding: 28px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

h1 {
  margin-top: 0;
  text-align: center;
}

h2 {
  margin-top: 0;
}

.intro {
  text-align: center;
  color: #555;
  margin-bottom: 28px;
}

form,
.form-step.active {
  display: grid;
  gap: 18px;
}

.form-step {
  display: none;
}

label {
  display: grid;
  gap: 7px;
  font-weight: bold;
}

input,
select,
textarea {
  padding: 11px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: Arial, sans-serif;
}

textarea {
  resize: vertical;
}

button {
  margin-top: 10px;
  padding: 13px;
  border: none;
  border-radius: 8px;
  background: #1a73e8;
  color: white;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  background: #1558b0;
}

.secondary-button {
  background: #666;
}

.secondary-button:hover {
  background: #444;
}

.button-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.button-row button {
  flex: 1;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.matrix-table th,
.matrix-table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
}

.matrix-table th:first-child,
.matrix-table td:first-child {
  text-align: left;
  min-width: 220px;
}

.matrix-table input {
  transform: scale(1.15);
}

.instructor-feedback-card {
  padding: 16px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fafafa;
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.remove-instructor-button {
  background: #b3261e;
}

.remove-instructor-button:hover {
  background: #8c1d18;
}

#statusMessage {
  margin-top: 20px;
  text-align: center;
  font-weight: bold;
}

@media (max-width: 600px) {
  .container {
    margin: 0;
    min-height: 100vh;
    border-radius: 0;
    padding: 20px;
  }

  h1 {
    font-size: 1.5rem;
  }

.matrix-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.matrix-table {
  width: 100%;
  min-width: 620px;
  table-layout: fixed;
  border-collapse: collapse;
}

.matrix-table th,
.matrix-table td {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.matrix-table th:first-child,
.matrix-table td:first-child {
  width: 38%;
  min-width: 220px;
}

.matrix-table th:not(:first-child),
.matrix-table td:not(:first-child) {
  width: 12.4%;
  min-width: 80px;
}

  .button-row {
    flex-direction: column-reverse;
  }

  button {
    width: 100%;
  }
}

.dashboard-container {
  max-width: 1100px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 28px;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: white;
}

.dashboard-table th,
.dashboard-table td {
  border: 1px solid #ddd;
  padding: 9px;
  text-align: left;
  vertical-align: top;
}

.dashboard-table th {
  background: #f1f3f4;
  font-weight: bold;
}

.empty-table-message {
  color: #666;
  font-style: italic;
  margin-bottom: 24px;
}

@media (max-width: 700px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-table {
    min-width: 850px;
  }
}

.rating-poor {
  background: #ffe5e5;
  color: #b00020;
  font-weight: bold;
}

.response-card {
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
  background: #fff;
}

.response-card h4 {
  margin-top: 0;
  color: #1a73e8;
}

.response-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.response-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.response-question {
  font-weight: bold;
}

.rating-pill {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eee;
  font-weight: bold;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .response-item {
    grid-template-columns: 1fr;
  }
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

.container {
  width: calc(100% - 24px);
}

.matrix-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 600px) {
  .container {
    width: 100%;
    margin: 0;
    padding: 16px;
    border-radius: 0;
    box-shadow: none;
  }

  .matrix-table {
    min-width: 560px;
    font-size: 0.8rem;
  }

  .matrix-table th,
  .matrix-table td {
    padding: 6px;
  }

  .matrix-table th:first-child,
  .matrix-table td:first-child {
    min-width: 170px;
  }

  h1 {
    font-size: 1.4rem;
  }

  h2 {
    font-size: 1.1rem;
  }

  .intro {
    font-size: 0.95rem;
  }

  button,
  select,
  textarea,
  input {
    font-size: 1rem;
    width: 100%;
  }
}

.dashboard-container {
  max-width: 1200px;
  background: transparent;
  box-shadow: none;
}

.dashboard-container > h1,
.dashboard-container > .intro,
#adminStatus {
  text-align: center;
}

#summarySection,
#filterSection,
#tableSection {
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  margin-top: 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

#summarySection h2,
#filterSection h2,
#tableSection h2 {
  margin-top: 0;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 10px;
}

#tableSection > div {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fafafa;
}

#tableSection h3 {
  margin-top: 0;
  color: #1a365d;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.dashboard-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 0.92rem;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.dashboard-table th {
  background: #1a365d;
  color: white;
  position: sticky;
  top: 0;
  z-index: 1;
}

.dashboard-table th,
.dashboard-table td {
  padding: 11px;
  border-bottom: 1px solid #e5e7eb;
}

.dashboard-table tr:nth-child(even) td {
  background: #f8fafc;
}

.dashboard-table tr:hover td {
  background: #eef6ff;
}

.table-wrapper {
  border-radius: 12px;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
}

.response-card {
  border: 1px solid #dbe3ea;
  border-left: 6px solid #1a73e8;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 18px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.response-card h4 {
  margin: 0 0 10px;
  color: #1a365d;
  font-size: 1.1rem;
}

.response-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.response-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: #f8fafc;
  border-radius: 10px;
}

.response-question {
  font-weight: bold;
}

.rating-pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e5e7eb;
  font-weight: bold;
  white-space: nowrap;
}

.rating-poor {
  background: #ffe5e5 !important;
  color: #b00020 !important;
  font-weight: bold;
}

/*
.rating-fair {
  background: #fff4d6;
  color: #8a5a00;
  font-weight: bold;
}

.rating-excellent {
  background: #e8f5e9;
  color: #1b5e20;
  font-weight: bold;
}
*/

#signInButton,
#signOutButton,
#exportButton,
#clearFiltersButton {
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

#exportButton {
  background: #0f766e;
}

#exportButton:hover {
  background: #115e59;
}

.empty-table-message {
  padding: 14px;
  background: #f8fafc;
  border-radius: 10px;
  color: #64748b;
}

@media (max-width: 700px) {
  .dashboard-container {
    padding: 14px;
  }

  #summarySection,
  #filterSection,
  #tableSection {
    padding: 16px;
  }

  #tableSection > div {
    padding: 14px;
  }

  .response-item {
    grid-template-columns: 1fr;
  }
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 8px;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #1a73e8;
  cursor: pointer;
  flex-shrink: 0;
}