/* =======================
      GLOBAL
======================= */
body {
  font-family: 'El Messiri';
  margin: 0;
  padding: 0;
}

button, input {
  font-family: inherit;
}

input {
  width: 120px;
  text-align: center;
  box-shadow: inset 1px 1px 1px #1a1a1a;
  border-radius: 5px;
}

/* =======================
      HEADINGS
======================= */
h1 {
  text-align: center;
  color: #333;
  margin-bottom: 25px;
  font-size: 26px;
}
.container h2 {
    text-align: center;
    color: #cf1414;
}

/* =======================
      STUDENT INFO BOX
======================= */
.student-info {
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.student-info label {
  font-weight: bold;
  display: block;
  margin-bottom: 6px;
}

.student-info input {
  width: 98%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-bottom: 15px;
  font-size: 20px;
}

.save-hint {
  font-size: 13px;
  color: #595959 !important;
}

/* =======================
      TABLE
======================= */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  min-width: 800px;
  border-radius: 10px;
  overflow: hidden;
}

table th,
table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
}

th {
  background: #000;
  color: #FFF;
  font-size: 14px;
}

td[contenteditable="true"],
th[contenteditable="true"] {
  cursor: text;
}

td:focus,
th:focus {
  outline: none;
  background: #ececec;
}

/* =======================
      BUTTONS
======================= */
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.btn {
  padding: 10px 16px;
  font-size: 16px;
  color: #fff;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

.print-btn { background: #333; color:#FFF;}
.clear-btn { background: #000; }

.print-btn:hover { background: #218838; }
.clear-btn:hover { background: #c82333; }


/* =======================
      MAIN BACKGROUND
======================= */
main {
  background-color: #eee;
  background-image: linear-gradient(135deg,
      rgba(255, 255, 255, .50) 25%,
      transparent 25%,
      transparent 50%,
      rgba(255, 255, 255, .50) 50%,
      rgba(255, 255, 255, .50) 75%,
      transparent 75%,
      transparent);
  background-size: 200px 200px;
}

/* =======================
      PAGE CONTAINER
======================= */
.container {
  max-width: 90%;
  margin: auto;
  padding: 15px;
}


/* =======================
      MOBILE
======================= */
@media (max-width: 600px) {
  h1 { font-size: 22px; }

  th, td {
    padding: 6px;
    font-size: 13px;
  }

  .btn {
    width: 100%;
    padding: 10px;
    font-size: 15px;
  }
}

/* =======================
      PRINT MODE
======================= */
@media print {
  .actions,
  header,
  footer,
  .save-hint,
  .text-center,
  .circle,
  .button2 {
    display: none !important;
  }
  th {
    background: #007bff !important;
    color: #fff !important;
  }
}
