:root {
  --app-bg: #f4f7f5;
  --ink: #172033;
  --muted: #5d6878;
  --cugdl-green: #006341;
  --cugdl-green-dark: #003f2d;
  --cugdl-gold: #c9a227;
  --surface: #fff;
  --line: #dbe2ea;
}

body {
  background:
    linear-gradient(180deg, #eef5f1 0, var(--app-bg) 240px, #f7f8fa 100%);
  color: var(--ink);
}

.site-header {
  background: #fff;
  border-bottom: 1px solid rgba(0, 63, 45, 0.16);
  box-shadow: 0 14px 32px rgba(12, 31, 45, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 104px;
  padding: 18px 0;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-block:hover {
  color: inherit;
}

.brand-logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 218px;
  max-width: 38vw;
}

.brand-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-label {
  color: var(--cugdl-green);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand-title {
  color: var(--ink);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 750;
  line-height: 1.08;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.25;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.header-link {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(0, 99, 65, 0.22);
  border-radius: 999px;
  color: var(--cugdl-green-dark);
  display: inline-flex;
  font-size: 0.92rem;
  font-weight: 650;
  min-height: 38px;
  padding: 8px 14px;
  text-decoration: none;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.header-link:hover,
.header-link:focus {
  background: rgba(0, 99, 65, 0.08);
  border-color: rgba(0, 99, 65, 0.45);
  color: var(--cugdl-green-dark);
}

.header-actions .header-link:nth-child(-n + 2) {
  border-color: rgba(201, 162, 39, 0.5);
}

.header-link-danger {
  border-color: rgba(156, 51, 40, 0.28);
  color: #8f2d24;
}

.header-link-danger:hover,
.header-link-danger:focus {
  background: rgba(156, 51, 40, 0.08);
  border-color: rgba(156, 51, 40, 0.45);
  color: #752119;
}

.header-accent {
  height: 5px;
  background: linear-gradient(90deg, var(--cugdl-green) 0 62%, var(--cugdl-gold) 62% 78%, #8f2d24 78% 100%);
}

.page-shell {
  padding: 32px 0 56px;
}

.auth-panel,
.form-panel,
.service-card,
.empty-state,
.filter-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(19, 33, 68, 0.06);
}

.auth-panel,
.form-panel,
.empty-state,
.filter-panel {
  padding: 24px;
}

.student-login-panel {
  max-width: 440px;
  margin: 0 auto;
}

.student-login-panel label {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 650;
  margin-bottom: 6px;
}

.student-code-input {
  font-size: 1rem;
  min-height: 42px;
}

.service-card {
  overflow: hidden;
}

.service-card-unavailable {
  filter: grayscale(1);
  opacity: 0.62;
}

.service-image {
  min-height: 136px;
  background-color: #e7edf5;
  background-position: center;
  background-size: cover;
}

.student-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.student-summary span,
.summary-chip {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  line-height: 1.35;
  min-height: 38px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.summary-chip {
  appearance: none;
  font-family: inherit;
}

.summary-chip-action {
  cursor: pointer;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.summary-chip-action:hover,
.summary-chip-action:focus {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.request-group,
.identification-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.request-group {
  background: #fff;
}

.identification-card {
  background: #f8fbf9;
  border-color: rgba(0, 99, 65, 0.18);
}

.student-data-lines {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 0 0 20px;
  overflow: hidden;
}

.student-data-line {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 11px 14px;
}

.student-data-line + .student-data-line {
  border-top: 1px solid var(--line);
}

.student-data-line--four-columns {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.student-data-line--single-column {
  grid-template-columns: 1fr;
}

.student-data-line--two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.student-data-item {
  min-width: 0;
}

.student-data-item dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.student-data-item dt:not(:first-child) {
  margin-top: 10px;
}

.student-data-item dd {
  color: var(--ink);
  font-weight: 600;
  margin: 0;
  overflow-wrap: anywhere;
}

.condonation-introduction {
  background: #f8fbf9;
  border: 1px solid rgba(0, 99, 65, 0.18);
  border-radius: 8px;
  color: #334155;
  line-height: 1.55;
  padding: 20px;
}

.condonation-introduction-divider {
  border: 0;
  border-top: 1px solid rgba(0, 99, 65, 0.24);
  margin: 16px 0;
  opacity: 1;
}

.condonation-requirements,
.condonation-guideline {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 0;
  padding: 14px 16px;
}

.condonation-requirements h3,
.condonation-guideline h3 {
  color: var(--ink);
  font-weight: 750;
  line-height: 1.4;
  text-transform: uppercase;
}

.condonation-requirements {
  margin-bottom: 28px;
}

.condonation-requirements ol {
  padding-left: 1.25rem;
}

.condonation-requirements li + li {
  margin-top: 6px;
}

.condonation-guideline {
  border-left: 4px solid var(--cugdl-gold);
  margin-bottom: 28px;
}

.condonation-guideline h3 {
  margin-bottom: 1.25rem;
}

.condonation-file-name {
  font-size: 0.92rem;
}

.condonation-file-name-label {
  font-weight: 400;
  text-transform: uppercase;
}

.condonation-file-name code {
  color: var(--cugdl-green-dark);
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.request-group-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.request-group-number {
  align-items: center;
  background: var(--cugdl-green);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.9rem;
  font-weight: 750;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.privacy-notice {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-left: 4px solid var(--cugdl-green);
  border-radius: 8px;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.55;
  padding: 18px;
}

.privacy-notice h2 {
  color: var(--ink);
  font-weight: 750;
}

.consent-check {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 10px;
  padding: 14px 14px 14px 42px;
}

.consent-check label {
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.4;
}

.summary-chip-action:focus-visible {
  box-shadow: 0 0 0 0.2rem rgba(0, 99, 65, 0.16);
  outline: 0;
}

.failed-subjects-modal {
  border: 1px solid rgba(0, 99, 65, 0.16);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(12, 31, 45, 0.22);
  overflow: hidden;
}

.failed-subjects-modal .modal-header {
  background: linear-gradient(180deg, #f6faf8 0, #fff 100%);
  border-bottom-color: rgba(0, 99, 65, 0.12);
}

.action-confirm-modal {
  border: 1px solid rgba(0, 99, 65, 0.18);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(12, 31, 45, 0.24);
  overflow: hidden;
}

.action-confirm-modal .modal-header {
  background: linear-gradient(135deg, #eef7f2 0, #fff 72%);
  border-bottom: 4px solid var(--cugdl-gold);
  padding: 22px 28px;
}

.action-confirm-modal .modal-header p {
  color: var(--cugdl-green);
  letter-spacing: 0.08em;
}

.action-confirm-message {
  color: var(--ink);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.55;
}

.action-confirm-modal .modal-footer {
  background: #f8faf9;
  border-top-color: rgba(0, 99, 65, 0.12);
}

.failed-subjects-table thead th {
  background: #f4f7f5;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.failed-subjects-table tbody tr:last-child td {
  border-bottom: 0;
}

.article-subjects-section {
  background: #f8fbf9;
  border: 1px solid rgba(0, 99, 65, 0.14);
  border-radius: 8px;
  padding: 18px;
}

.article-subjects-count {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.86rem;
  padding: 6px 10px;
}

.form-label {
  font-weight: 600;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  border-left: 3px solid #2f6fed;
  padding: 4px 0 4px 14px;
}

@media (max-width: 767.98px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    padding: 16px 0;
  }

  .brand-block {
    align-items: flex-start;
    gap: 14px;
    width: 100%;
  }

  .brand-logo {
    width: 148px;
    max-width: 44vw;
    padding-top: 2px;
  }

  .brand-title {
    font-size: 1.25rem;
  }

  .brand-subtitle {
    font-size: 0.88rem;
  }

  .header-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .header-link {
    justify-content: center;
  }

  .page-shell {
    padding-top: 24px;
  }
}

@media (max-width: 420px) {
  .brand-block {
    flex-direction: column;
  }

  .brand-logo {
    max-width: 72vw;
    width: 184px;
  }
}

@media (max-width: 575.98px) {
  .student-data-line {
    gap: 10px;
    grid-template-columns: 1fr;
  }
}
