@import url("https://fonts.googleapis.com/css2?family=Montserrat+Alternates:wght@400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat Alternates", sans-serif;
}

:root {
  --primary: #137239;
  --primary-dark: #0d5a2e;
  --primary-light: #e8f5e9;
  --text-dark: #1a1a2e;
  --text-light: #666;
  --bg: #f0f4f8;
  --white: #ffffff;
  --border: #e0e6ed;
  --shadow: 0 4px 20px rgba(19, 114, 57, 0.1);
  --radius: 12px;
}

body {
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
}

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

/* Header */
header {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(19, 114, 57, 0.2);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.4rem;
  font-weight: 600;
}

nav a {
  color: white;
  text-decoration: none;
  margin-left: 1.5rem;
  opacity: 0.9;
  transition: opacity 0.2s;
}

nav a:hover {
  opacity: 1;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-light);
  font-size: 0.875rem;
}

/* Auth Pages */
.auth-page,
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 80px);
  padding: 2rem 0;
}

.auth-card {
  background: var(--white);
  padding: 3rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  width: 100%;
  max-width: 420px;
}

.auth-card h2 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.75rem;
}

.auth-card > p {
  color: var(--text-light);
  margin-bottom: 2rem;
}

.auth-card input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 1rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.auth-card input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(19, 114, 57, 0.1);
}

.auth-card .error {
  color: #dc3545;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #fce8e8;
  border-radius: 8px;
  font-size: 0.9rem;
}

.auth-card button {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.1s;
}

.auth-card button:hover {
  background: var(--primary-dark);
}

.auth-card button:active {
  transform: scale(0.98);
}

.auth-card .switch-link {
  margin-top: 1.5rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

.auth-card .switch-link a {
  color: var(--primary);
  font-weight: 500;
}

/* Dashboard */
.dashboard-page {
  margin-top: 2rem;
}

.dashboard-page h2 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.dashboard-page .welcome {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

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

.form-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 2px solid transparent;
}

.form-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(19, 114, 57, 0.15);
  border-color: var(--primary);
}

.form-card h3 {
  color: var(--text-dark);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.form-card p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.form-card .badge {
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Form Page */
.form-page {
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  margin-top: 2rem;
}

.form-page h2 {
  color: var(--primary);
  margin-bottom: 0.25rem;
  font-size: 1.75rem;
}

.form-page .subtitle {
  color: var(--text-light);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.form-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-section h3 {
  color: var(--text-dark);
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-section h3::before {
  content: "";
  width: 4px;
  height: 20px;
  background: var(--primary);
  border-radius: 2px;
}

.form-section .hint {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  font-style: italic;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(19, 114, 57, 0.1);
}

/* Checkbox & Radio Groups */
.checkbox-group,
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.checkbox-group label,
.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  background: var(--primary-light);
  border-radius: 20px;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.checkbox-group label:hover,
.radio-group label:hover {
  background: #d7eedd;
}

.checkbox-group input,
.radio-group input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* Score Rows */
.score-row {
  background: var(--primary-light);
  padding: 1.25rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
}

.score-label strong {
  display: block;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.score-desc {
  font-size: 0.8rem;
  color: var(--text-light);
}

.score-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.score-input input {
  width: 70px;
  padding: 0.75rem;
  text-align: center;
  border: 2px solid var(--primary);
  border-radius: 8px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--white);
}

.score-input input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(19, 114, 57, 0.2);
}

.score-input span {
  color: var(--text-light);
  font-weight: 500;
}

.score-justification {
  grid-column: 1 / -1;
}

.score-justification input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
}

/* Assessment Rows (Expert Form) */
.assessment-row {
  background: var(--primary-light);
  padding: 1.25rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.assessment-label strong {
  display: block;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.assessment-desc {
  font-size: 0.8rem;
  color: var(--text-light);
}

.assessment-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.assessment-options label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.75rem;
  background: var(--white);
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.assessment-options label:hover {
  background: #d7eedd;
}

.assessment-options input {
  accent-color: var(--primary);
}

.total-score {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  border-radius: 10px;
  text-align: center;
  font-size: 1.25rem;
  color: white;
}

.total-score span {
  font-weight: 700;
  font-size: 1.5rem;
}

/* Submission Section */
.submission-section {
  background: var(--primary-light);
  padding: 1.5rem 2rem;
  border-radius: 10px;
  margin: 2rem -2.5rem -2.5rem;
}

.form-actions {
  text-align: center;
  padding-top: 2rem;
}

.btn-primary {
  display: inline-block;
  padding: 1rem 3rem;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(19, 114, 57, 0.3);
}

/* Thank You */
.thankyou-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
}

.thankyou-card {
  background: var(--white);
  padding: 3rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 450px;
}

.thankyou-card .check-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem;
}

.thankyou-card h2 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.75rem;
}

.thankyou-card p {
  color: var(--text-light);
  margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .form-page {
    padding: 1.5rem;
  }

  .submission-section {
    margin: 2rem -1.5rem -1.5rem;
    padding: 1.5rem;
  }

  .score-row {
    grid-template-columns: 1fr;
  }

  .score-input {
    justify-content: flex-start;
  }

  .auth-card {
    padding: 2rem;
  }
}

/* Submissions Page */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
}

.empty-state p {
  margin-bottom: 1.5rem;
}

.submissions-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.submission-card {
  background: var(--primary-light);
  padding: 1.5rem;
  border-radius: var(--radius);
}

.submission-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.submission-header h4 {
  color: var(--text-dark);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.submission-meta {
  color: var(--text-light);
  font-size: 0.85rem;
}

.submission-score {
  text-align: right;
}

.score-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.score-max {
  color: var(--text-light);
  font-size: 1rem;
}

.submission-details {
  margin-bottom: 1rem;
}

.detail-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.detail-row strong {
  color: var(--text-dark);
}

.detail-row.comments {
  flex-direction: column;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(19, 114, 57, 0.2);
}

.scores-breakdown {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.score-item {
  background: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.score-item span {
  color: var(--text-light);
}

.score-item strong {
  color: var(--primary);
  font-weight: 600;
}

.submission-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(19, 114, 57, 0.2);
}

.btn-edit {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-edit:hover {
  background: var(--primary);
  color: white;
}

.btn-new {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-new:hover {
  background: var(--primary);
  color: white;
}

.btn-secondary {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 8px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--primary-light);
}

/* Dashboard Sections */
.dashboard-section {
  margin-bottom: 2.5rem;
}

.dashboard-section h3 {
  color: var(--text-dark);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.form-start {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.form-start .btn-primary {
  padding: 1rem 2.5rem;
}

.helper-text {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.submission-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dashboard-page .submission-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.dashboard-page .submission-card:hover {
  transform: translateX(5px);
  box-shadow: 0 6px 25px rgba(19, 114, 57, 0.15);
}

.dashboard-page .card-icon {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: 10px;
}

.dashboard-page .card-content {
  flex: 1;
}

.dashboard-page .card-content h4 {
  color: var(--text-dark);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.dashboard-page .card-content p {
  color: var(--text-light);
  font-size: 0.85rem;
}

.dashboard-page .arrow {
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 600;
}
