:root {
  --bg: #f6f8ff;
  --bg-card: rgba(255, 255, 255, 0.95);
  --text: #1f2945;
  --muted: #667085;
  --border: rgba(145, 158, 171, 0.24);
  --accent: #4f46e5;
  --accent-soft: #eef2ff;
  --accent-dark: #312e81;
  --success: #059669;
  --warn: #f59e0b;
  --shadow: 0 24px 64px rgba(15, 23, 42, 0.08);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.18), transparent 30%),
              radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.14), transparent 30%),
              var(--bg);
  color: var(--text);
}

.basic-report-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.basic-report-header {
  display: grid;
  gap: 28px;
  grid-template-columns: 1.8fr 1fr;
  align-items: center;
  padding: 32px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.95), rgba(88, 80, 255, 0.9));
  border-radius: 36px;
  box-shadow: var(--shadow);
  color: white;
}

.badge-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0.75rem 1rem;
}

.basic-report-header h1 {
  margin: 16px 0 10px;
  font-size: clamp(2rem, 2.5vw, 3rem);
  line-height: 1.05;
}

.basic-report-header p {
  margin: 0;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  line-height: 1.7;
}

.basic-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-end;
}

.button {
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 22px;
  cursor: pointer;
  text-decoration: none;
}

.button-primary {
  background: white;
  color: var(--accent-dark);
  box-shadow: 0 20px 40px rgba(31, 41, 55, 0.18);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.16);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.basic-report-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.06);
}

.filter-card label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: var(--muted);
}

.filter-card input,
.filter-card select {
  width: 100%;
  border: 1px solid rgba(145, 158, 171, 0.18);
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 1rem;
  color: var(--text);
  background: #fff;
}

.basic-report-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.summary-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px;
  border-radius: 28px;
  color: white;
  min-height: 160px;
  position: relative;
  overflow: hidden;
}

.gradient-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(59, 130, 246, 0.75));
}

.gradient-card.alt {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.85), rgba(16, 185, 129, 0.76));
}

.summary-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  font-size: 1.5rem;
}

.summary-title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  opacity: 0.9;
}

.summary-card h2 {
  margin: 0;
  font-size: 2.05rem;
  letter-spacing: -0.03em;
}

.basic-report-main {
  display: grid;
  gap: 24px;
}

.report-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 32px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.report-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
  position: relative;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(246, 248, 255, 1), rgba(236, 245, 255, 0.92));
  border-radius: 28px;
  border: 2px solid rgba(203, 213, 225, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.header-left {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-center {
  flex: 1;
  text-align: center;
  padding: 0 1rem;
}

.header-right {
  flex: 0 0 auto;
}

.school-logo {
  width: 120px;
  height: 140px;
  object-fit: contain;
  border-radius: 24px;
  background: white;
  padding: 0.75rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.ges-header {
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.65rem;
  border-bottom: 2px solid rgba(79, 70, 229, 0.65);
  padding-bottom: 0.4rem;
}

.school-name {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text);
  text-transform: uppercase;
  margin-bottom: 0.55rem;
  line-height: 1.2;
}

.school-address {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-style: italic;
}

.school-contact {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.school-contact a {
  color: var(--accent-dark);
  text-decoration: none;
}

.school-contact a:hover {
  text-decoration: underline;
}

.motto-header-dup {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-dark);
}

.student-info {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(248, 250, 252, 1), rgba(255, 255, 255, 0.98));
  border-radius: 24px;
  border: 2px solid rgba(203, 213, 225, 0.92);
}

.student-info table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.student-info td {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(203, 213, 225, 0.95);
  background: white;
}

.student-info td:nth-child(odd) {
  background: rgba(241, 245, 255, 0.95);
  font-weight: 700;
  color: var(--text);
  width: 35%;
}

.student-info td:nth-child(even) {
  color: var(--muted);
  font-weight: 600;
}

.basic-sheet-header,
.basic-sheet-header::before,
.basic-sheet-block,
.basic-sheet-impact,
.basic-sheet-logo-box,
.basic-sheet-block,
.basic-sheet-ges,
.basic-sheet-school,
.basic-sheet-address,
.basic-sheet-contact,
.basic-sheet-impact,
.basic-sheet-title {
  display: none;
}

.basic-sheet-motto {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.basic-sheet-logo-box {
  display: grid;
  place-items: center;
}

.basic-sheet-logo {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  background: white;
  display: grid;
  place-items: center;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
}

.basic-sheet-logo img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.card-subtitle {
  color: var(--muted);
  font-size: 0.99rem;
}

.report-label {
  padding: 12px 20px;
  background: var(--accent-soft);
  border-radius: 999px;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.95rem;
}

.student-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.student-meta-grid div span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.student-meta-grid strong {
  display: block;
  font-size: 1.05rem;
}

.report-details-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.detail-panel {
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(247, 250, 255, 0.96), rgba(255, 255, 255, 0.88));
  border: 1px solid rgba(145, 158, 171, 0.16);
}

.detail-label {
  display: block;
  color: var(--muted);
  margin-bottom: 12px;
  font-weight: 600;
}

.detail-value {
  font-size: 1.75rem;
  font-weight: 800;
}

.grades-table-wrap {
  overflow-x: auto;
  margin-bottom: 28px;
}

.grades-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.grades-table th,
.grades-table td {
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(145, 158, 171, 0.16);
}

.grades-table th {
  background: rgba(79, 70, 229, 0.06);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  color: var(--accent-dark);
}

.grades-table tbody tr:nth-child(odd) {
  background: rgba(79, 70, 229, 0.03);
}

.grades-table td {
  font-size: 0.97rem;
}

.report-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.remark-box,
.attainment-box {
  background: rgba(247, 250, 255, 0.98);
  border-radius: 26px;
  padding: 24px;
  border: 1px solid rgba(145, 158, 171, 0.14);
}

.remark-box strong,
.attainment-box strong {
  display: block;
  margin-bottom: 16px;
  font-size: 1rem;
}

.remark-box p,
.attainment-box ul {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.attainment-box ul {
  padding-left: 18px;
}

.attainment-box li {
  margin-bottom: 10px;
}

.remarks {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(248, 250, 252, 1), rgba(255, 255, 255, 0.98));
  border-radius: 24px;
  border: 2px solid rgba(203, 213, 225, 0.92);
}

.remarks table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.remarks td {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(203, 213, 225, 0.95);
  background: white;
}

.remarks p {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.75;
}

.approval-section {
  margin-bottom: 2.5rem;
}

.approval-columns {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
  justify-content: center;
  padding: 0 1rem;
}

.approval-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 220px;
}

.approval-label {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
  width: 100%;
}

.signature-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  width: 200px;
  max-width: 100%;
  min-height: 90px;
  overflow: visible;
  margin: 0 auto 0.4rem auto;
  border-radius: 16px;
  padding: 0.6rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid rgba(145, 158, 171, 0.22);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.signature-line {
  width: 240px;
  max-width: 95%;
  border-bottom: 2px solid rgba(48, 64, 159, 0.65);
  margin: 0.25rem auto 0 auto;
}

.signature-name {
  width: 100%;
  text-align: center;
  min-height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Dancing Script', 'Brush Script MT', 'Lucida Handwriting', 'Segoe Script', cursive;
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.0;
  letter-spacing: 0.04em;
}

.signature-image {
  width: 100%;
  height: auto;
  max-height: 90px;
  object-fit: contain;
  object-position: center;
  display: block;
}

.report-footer {
  display: flex;
  gap: 14px;
  justify-content: flex-start;
  flex-wrap: wrap;
  padding: 1rem 0;
}

.report-footer button {
  border: none;
  border-radius: 999px;
  padding: 14px 24px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.report-footer button:hover {
  transform: translateY(-1px);
}

.report-footer button:first-child {
  background: var(--accent-dark);
  color: white;
}

.report-footer button:last-child {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

@media (max-width: 1024px) {
  .basic-report-header { grid-template-columns: 1fr; }
  .basic-report-actions { justify-content: flex-start; }
  .basic-report-filters { grid-template-columns: 1fr 1fr; }
  .student-meta-grid, .report-details-grid, .report-footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .basic-report-shell { padding: 20px 16px 40px; }
  .basic-report-filters { grid-template-columns: 1fr; }
  .button { width: 100%; text-align: center; }
  .basic-report-actions { flex-direction: column; }
}

@media print {
  * {
    box-shadow: none !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
  }

  body {
    background: white;
    margin: 0;
    padding: 0;
  }

  .basic-report-shell {
    max-width: 210mm;
    margin: 0 auto;
    padding: 10mm;
  }

  .basic-report-header,
  .basic-report-filters,
  .report-footer {
    display: none !important;
  }

  .basic-report-main {
    gap: 0;
  }

  .report-card {
    background: white;
    border: 3px solid #1f2945;
    border-radius: 0;
    padding: 1rem;
    box-shadow: none;
    page-break-inside: avoid;
    line-height: 1.4;
  }

  .report-card-header {
    margin-bottom: 1rem;
    padding: 0.75rem 0.5rem;
    background: white;
    border: none;
    box-shadow: none;
    gap: 1rem;
    page-break-inside: avoid;
  }

  .header-left {
    flex: 0 0 60px;
  }

  .school-logo {
    width: 60px;
    height: 70px;
    padding: 0.25rem;
    box-shadow: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
  }

  .header-center {
    flex: 1;
    padding: 0 0.5rem;
  }

  .ges-header {
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    padding-bottom: 0.2rem;
    letter-spacing: 0.5px;
  }

  .school-name {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    line-height: 1.1;
  }

  .school-address {
    font-size: 0.7rem;
    margin-bottom: 0.2rem;
    line-height: 1.2;
  }

  .school-contact {
    font-size: 0.65rem;
    line-height: 1.2;
  }

  .school-contact a {
    text-decoration: none;
    color: inherit;
  }

  .motto-header-dup {
    margin-top: 0.3rem;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
  }

  .report-card-header h2 {
    display: none;
  }

  .student-info {
    margin-bottom: 0.75rem;
    padding: 0.75rem 0.5rem;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    page-break-inside: avoid;
  }

  .student-info table {
    font-size: 0.8rem;
    margin: 0;
  }

  .student-info td {
    padding: 0.4rem 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
  }

  .student-info td:nth-child(odd) {
    background: rgba(0, 0, 0, 0.02);
    width: 35%;
  }

  .grades-table-wrap {
    margin-bottom: 0.75rem;
    page-break-inside: avoid;
  }

  .grades-table {
    min-width: auto;
  }

  .grades-table th,
  .grades-table td {
    padding: 0.4rem 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.78rem;
  }

  .grades-table th {
    background: rgba(0, 0, 0, 0.05);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .grades-table tbody tr:nth-child(odd) {
    background: white;
  }

  .remarks {
    margin-bottom: 0.75rem;
    padding: 0.75rem 0.5rem;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    page-break-inside: avoid;
  }

  .remarks table {
    font-size: 0.78rem;
    margin-bottom: 0.5rem;
  }

  .remarks td {
    padding: 0.35rem 0.4rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
  }

  .remarks p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.3;
  }

  .approval-section {
    margin-bottom: 0.5rem;
    page-break-inside: avoid;
  }

  .approval-columns {
    gap: 0.8rem;
    margin-bottom: 0.6rem;
    padding: 0;
  }

  .approval-col {
    max-width: 160px;
  }

  .approval-label {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
  }

  .signature-box {
    width: 160px;
    min-height: 70px;
    margin: 0 auto 0.25rem auto;
    padding: 0.4rem 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: none;
    gap: 0.2rem;
  }

  .signature-line {
    width: 95%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
    margin: 0.15rem auto 0 auto;
  }

  .signature-name {
    min-height: 1.2rem;
    font-size: 1.2rem;
    line-height: 1;
  }

  .signature-image {
    max-height: 60px;
  }
}
