/* THSI Admissions Portal — responsive styles */

.thsi-portal,
.thsi-admin-wrap {
  --thsi-green: #0d5c2e;
  --thsi-green-dark: #094020;
  --thsi-teal: #0b5c6b;
  --thsi-bg: #f4f8f5;
  --thsi-border: #d6e4da;
  --thsi-text: #1f2933;
  --thsi-radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  color: var(--thsi-text);
  max-width: 960px;
  margin: 0 auto;
  line-height: 1.5;
}

.thsi-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--thsi-green), var(--thsi-teal));
  color: #fff;
  border-radius: var(--thsi-radius);
}

.thsi-header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
  color: #fff;
}

.thsi-header p {
  margin: 0;
  opacity: 0.95;
}

.thsi-section {
  background: #fff;
  border: 1px solid var(--thsi-border);
  border-radius: var(--thsi-radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.thsi-section h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: var(--thsi-green);
  border-bottom: 2px solid var(--thsi-border);
  padding-bottom: 0.5rem;
}

.thsi-section h3 {
  font-size: 1rem;
  color: var(--thsi-teal);
  margin: 1rem 0 0.75rem;
}

.thsi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.thsi-grid--subjects {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.thsi-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.thsi-field label {
  font-weight: 600;
  font-size: 0.9rem;
}

.thsi-field input,
.thsi-field select,
.thsi-field textarea {
  padding: 0.65rem 0.75rem;
  border: 1px solid #c5d4cb;
  border-radius: 6px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.thsi-field input:focus,
.thsi-field select:focus,
.thsi-field textarea:focus {
  outline: 2px solid rgba(13, 92, 46, 0.25);
  border-color: var(--thsi-green);
}

.thsi-btn {
  display: inline-block;
  background: var(--thsi-green);
  color: #fff !important;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.2s;
}

.thsi-btn:hover {
  background: var(--thsi-green-dark);
  color: #fff;
}

.thsi-btn--outline {
  background: transparent;
  color: var(--thsi-green) !important;
  border: 2px solid var(--thsi-green);
}

.thsi-btn--outline:hover {
  background: var(--thsi-green);
  color: #fff !important;
}

.thsi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  background: var(--thsi-bg);
}

.thsi-notice {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
}

.thsi-notice--success {
  background: #e8f6ed;
  border: 1px solid #9fd4b0;
  color: #0d5c2e;
}

.thsi-notice--error {
  background: #fdecea;
  border: 1px solid #f5b8b1;
  color: #8a1f11;
}

.thsi-notice--info {
  background: #e8f4f8;
  border: 1px solid #a8d4e6;
  color: #0b5c6b;
}

.thsi-help {
  font-size: 0.9rem;
  color: #5a6b63;
  margin: 0 0 1rem;
}

.thsi-payment-box {
  background: #f9fcfa;
}

.thsi-fee-summary table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.thsi-fee-summary td {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--thsi-border);
}

.thsi-fee-summary tr.thsi-total td {
  border-bottom: none;
  padding-top: 0.75rem;
  font-size: 1.05rem;
}

.thsi-fee-summary td:last-child {
  text-align: right;
}

.thsi-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.thsi-badge--draft { background: #e8e8e8; color: #555; }
.thsi-badge--pending { background: #fff3cd; color: #856404; }
.thsi-badge--approved { background: #d4edda; color: #155724; }
.thsi-badge--rejected { background: #f8d7da; color: #721c24; }

.thsi-dashboard-grid,
.thsi-auth-grid,
.thsi-download-grid,
.thsi-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.thsi-card {
  background: #fff;
  border: 1px solid var(--thsi-border);
  border-radius: var(--thsi-radius);
  padding: 1.25rem;
}

.thsi-card h2 {
  margin-top: 0;
  color: var(--thsi-green);
  font-size: 1.1rem;
}

.thsi-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.thsi-link-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--thsi-border);
}

.thsi-link-list li:last-child {
  border-bottom: none;
}

.thsi-info-table {
  width: 100%;
}

.thsi-info-table th {
  text-align: left;
  padding: 0.4rem 0.75rem 0.4rem 0;
  vertical-align: top;
  width: 40%;
}

.thsi-status-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.thsi-status-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--thsi-border);
  border-radius: var(--thsi-radius);
  opacity: 0.65;
}

.thsi-status-step.is-active,
.thsi-status-step.is-done {
  opacity: 1;
}

.thsi-status-step.is-done .thsi-step-num {
  background: var(--thsi-green);
}

.thsi-status-step.is-active .thsi-step-num {
  background: var(--thsi-teal);
}

.thsi-step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #aaa;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.thsi-download-card {
  text-align: center;
}

.thsi-admission-no {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

.thsi-admin-wrap .thsi-table {
  margin-top: 1rem;
}

.thsi-admin-wrap .thsi-card--actions {
  margin-top: 1.5rem;
}

.thsi-inline-form {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .thsi-header h1 {
    font-size: 1.3rem;
  }

  .thsi-actions {
    flex-direction: column;
  }

  .thsi-actions .thsi-btn {
    width: 100%;
    text-align: center;
  }
}
