* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #ccc;
  font-family: Arial, Sans-Serif;
}

:root {
  --primary-color: #0073ce;
}

/* A4 page with border */
.a4 {
  width: 210mm;
  height: 297mm;
  margin: auto;

  background: url("images/border.png") no-repeat center;
  background-color: #fff;
  background-size: 100% 100%;
}

.content {
  width: 100%;
  height: 100%;
  padding: 20mm;
}

/* Print setup */
@page {
  size: A4;
  margin: 0;
}

@media print {
  body {
    background: none;
  }

  .a4 {
    margin: 0;
  }
}

.header {
  display: flex;
  align-items: center;
  padding-bottom: 5px;
  border-bottom: 5px solid var(--primary-color);
}

.header img {
  width: 50px;
  height: 50px;
  margin: 0 10px;
}


.english,
.arabic {
  width: 50%;
  height: 100px;
  color: #000;
  text-align: center;
}

.english {
  padding: 8px;
}

.arabic {
  padding: 0 8px;
}

.english h2,
.arabic h2 {
  font-weight: 600;
  color: var(--primary-color);
}

.english h2 {
  font-size: 10px;
}

.arabic h2 {
  font-size: 17px;
}

.english p {
  font-size: 11px;
  margin-top: 5px;
  font-family: Times New Roman;
  font-weight: 500;
}

.arabic p {
  font-size: 11px;
  margin-top: 5px;
  font-weight: 600;
}

.arabic .arabic-address {
  font-size: 10px;
}

.english p span {
  margin-left: 20px;
}

.label {
  margin-top: 10px;
  width: 100%;
  display: flex;
  /* background: #0080802e; */
}

.label .year,
.label .marksheet-label,
.label .date {
  width: 33.33%;
  height: 50px;
}

.label .year,
.label .date {
  display: flex;
  align-items: flex-end;
  padding-bottom: 5px;
  /* background: #0000ff2f; */
}

.label .marksheet-label {
  display: flex;
  justify-content: center;
  align-items: center;
  /* background: #00c6ff2f; */
}

.label .year p,
.label .date p {
  margin-left: 10px;
  font-size: 12px;
  font-weight: 400;
  font-family: 'Times New Roman', Times, serif;
  color: #000;
}

.label .year p span,
.label .date p span {
  display: inline-block;
  width: 80px;
  padding: 0 20px;
  border-bottom: 1px solid #000;
  font-weight: 600;
  text-align: center;
}

#date {
  width: 125px;
  font-size: 11px;
}

.marksheet {
  width: 80%;
  padding: 11px;
  text-align: center;
  border: 1px solid #000;
  border-radius: 50px;
  background: var(--primary-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.marksheet h3 {
  font-size: 13px;
  color: #fff;
  font-weight: 600;
}

.details {
  margin: 8px 0;
  width: 100%;
  height: 130px;
  padding: 5px 15px;
  border: 2px solid var(--primary-color);
  border-radius: 20px;
}

.details p {
  font-size: 14px;
  font-weight: 500;
  color: #000;
  margin-top: 15px;
}

.details p span {
  display: inline-block;
  width: 70%;
  padding: 0 35px;
  border-bottom: 1px solid #000;
  font-size: 16px;
  font-weight: 600;
  font-style: italic;
}

#father-name {
  width: 75%;
}

.details .inline-para {
  display: inline-block;
  width: 45%;
}

.details .inline-para span {
  width: 60%;
}

.details .inline-para:last-child {
  margin-left: 45px;
}

.mark-table {
  width: 100%;
  height: 460px;
  position: relative;
  overflow: hidden;
  /* background: #ffd5002f; */
}

/* Watermark logo */
.watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 550px;
  height: 550px;

  background: url("images/logo.jpg") no-repeat center;
  background-size: cover;

  transform: translate(-50%, -50%);
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

.marks,
.grand-total {
  width: 100%;
  border-collapse: collapse;
  position: relative;
  z-index: 1;
  table-layout: fixed;
}

/* column width control */
.marks col.sn {
  width: 5%;
}

.marks col.subject {
  width: 20%;
}

.marks col.small {
  width: 6.5%;
}

.marks th {
  border: 1px solid #000;
  padding: 6px;
  font-size: 12px;
  text-align: center;
}

.marks tr .sl {
  font-size: 8px;
}

.marks thead tr:first-child th {
  font-weight: 700;
}

.marks thead tr:last-child th {
  font-weight: 600;
  font-size: 11px;
}

.marks tbody tr td {
  border: 1px solid #000;
  padding: 6px;
  font-size: 12px;
  text-align: center;
}

.marks tbody tr .subjects {
  font-weight: 600;
  text-align: center;
  padding-left: 8px;
}

.marks tbody tr .obtained {
  font-weight: 600;
}

.grand-total {
  margin-top: 10px;
}

.grand-total td {
  border: 1px solid #000;
  ;
  padding: 6px;
  font-size: 12px;
  text-align: center;
  font-weight: 600;
}

.signature-box {
  width: 100%;
  height: 80px;
  margin-top: 15px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.sign {
  width: 30%;
  text-align: center;
}

.sign .line {
  width: 100%;
  border-bottom: 1px solid #000;
  margin-bottom: 5px;
}

.sign p {
  font-size: 12px;
  font-weight: 500;
}

.grade-chart {
  width: 100%;
  margin-top: 12px;
}

.grade-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.grade-table th {
  border: 1px solid #000;
  padding: 5px;
  text-align: center;
  font-weight: 700;
}

.grade-table td {
  border: 1px solid #000;
  padding: 4px;
  text-align: center;
  font-weight: 500;
}

/* bottom row (remarks) smaller text */
.grade-table tbody tr:last-child td {
  font-size: 10px;
}


.btn {
  width: 210mm;
  margin: 50px auto;
  display: flex;
  justify-content: center;
  gap: 30px;
}

.btn button {
  padding: 15px 30px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  background: var(--primary-color);
  color: white;
  cursor: pointer;
  border-radius: 6px;
}

.btn button:hover {
  opacity: 0.9;
}

@media print {
  .btn {
    display: none;
  }
}

/* Register Overlay */
.register-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.register {
  width: 100%;
  height: 100%;
  padding: 20px 0;
  background: #fffffff0;
  border-radius: 10px;
  text-align: center;
  overflow-y: auto;
}

.register h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--primary-color);
}

.register>span {
  position: absolute;
  top: 20px;
  right: 25px;
  cursor: pointer;
  font-size: 28px;
}

.warning {
  color: red;
  font-size: 18px;
  margin: 10px;
  text-align: center;
  font-weight: 600;
}


.register button {
  margin: 30px auto;
  padding: 10px 20px;
  background: var(--primary-color);
  color: #ffffff;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.register button:hover {
  opacity: 0.95;
}

.date-box {
  margin-top: 20px;
  padding: 20px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
}

.student-details {
  padding: 40px 20px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #ffffff;
}

.box label {
  padding: 5px 8px;
  display: block;
  text-align: left;
  color: #333;
  font-weight: 500;
  /* background: red; */
}

.box label span {
  color: red;
}

.box input {
  width: 180px;
  padding: 8px;
  border: 1px solid teal;
  border-radius: 6px;
  outline: none;
}

.box input::placeholder {
  color: #555;
}

.subject-section {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
}

.add-btn {
  padding: 20px;
  text-align: right;
}

.subject-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.subject-row input {
  padding: 10px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.subject-row input.subject-name {
  width: 250px;
}

.subject-row input.mark {
  width: 70px;
}

.no-scroll {
  overflow: hidden;
}

.position-box {
  text-align: left;
}