/* Palette:
   blue: #0F4C81  soft: #ECEFF1  line: #B0BEC5  ink: #333333
   bg: #f5f7f9 → #e4e8ec
*/

html { height: 100%; box-sizing: border-box; }
body {
  margin: 0; height: 100%;
  background: linear-gradient(135deg, #f5f7f9 0%, #e4e8ec 100%);
  color: #333333;
  font: 14px/1.4 "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.form-container {
  background: #ffffff;
  width: 100%; max-width: 1200px;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  position: relative;
}

.print-btn {
  position: absolute; top: 18px; right: 18px;
  background: #0F4C81; color: #ffffff;
  border: 0; padding: 10px 14px;
  border-radius: 8px; cursor: pointer; font-weight: 600;
}
.print-btn:hover { background: #0c3d68; }

/* Header */
.header {
  display: grid;
  grid-template-columns: 120px 1fr 1.4fr 1fr;
  gap: 16px; align-items: center;
  border-bottom: 2px solid #0F4C81;
  padding-bottom: 16px; margin-bottom: 16px;
  min-height: 120px; background: #ffffff;
}
.logo-wrap { display: flex; align-items: center; justify-content: center; }
.logo { display: block; width: 90px; height: auto; object-fit: contain; }

.college-info { color: #0F4C81; font-weight: 700; }
.main-title { text-align: center; }
.main-title h1 { margin: 0 0 6px; color: #0F4C81; font-size: 20px; }

.attempt-selection { display: flex; align-items: center; gap: 14px; justify-content: center; margin: 6px 0; }
.radio { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: #222; }

.year-input { display: flex; gap: 8px; align-items: center; justify-content: center; }

.input-field {
  border: 1px solid #B0BEC5; background: #ECEFF1;
  padding: 6px 8px; border-radius: 6px;
}

.lab-info { text-align: right; color: #0F4C81; }
.mt-8 { margin-top: 8px; }
.year-field { width: 80px; text-align: center; }
.lab-input { width: 56px; text-align: center; }
.tech-input { width: 200px; }

/* Table */
.table-wrap { margin-top: 8px; }
table {
  width: 100%; border-collapse: collapse; table-layout: fixed;
  border: 1px solid #B0BEC5;
}
th, td { border: 1px solid #B0BEC5; padding: 6px; vertical-align: top; }
th { background: #0F4C81; color: #ffffff; font-weight: 700; }

.date-col { width: 150px; }
.date-col .th-title { font-weight: 800; }
.date-col .th-sub { font-size: 12px; opacity: .9; }

.slot-header .slot-col .th-title { color: #ffffff; margin-bottom: 4px; }
.row-flex { display: grid; gap: 4px; grid-template-columns: 1fr 1fr; }
.lbl { font-size: 11px; color: #13324a; }

.sel {
  width: 100%; border: 1px solid #B0BEC5; border-radius: 6px;
  background: #ffffff; padding: 4px;
}
.slot-col.warn { outline: 2px solid #c62828; outline-offset: -2px; }

.date-cell { background: #ECEFF1; text-align: center; }

/* >>> Ensure textboxes fit inside cells <<< */
.slot {
  background: #f9fbfc;
  padding: 4px;
  height: 72px;           /* fixed row height for data cells */
  position: relative;
}
.txt {
  display: block;
  width: 100%;
  height: 100%;           /* fill the cell */
  border: 1px solid #B0BEC5;
  border-radius: 6px;
  background: #ffffff;
  padding: 6px;
  box-sizing: border-box;
  resize: none;           /* no external resize that could overflow */
  overflow: auto;         /* scroll inside if text is longer */
}

/* Footer */
.footer {
  display: flex; gap: 24px; justify-content: space-between;
  border-top: 2px solid #0F4C81; padding-top: 16px; margin-top: 16px;
}
.signature-box { width: 48%; }
.footer-input {
  width: 100%; border: 1px solid #B0BEC5; border-radius: 6px;
  background: #ECEFF1; padding: 8px;
}
.signature-box.right .head { font-weight: 800; text-align: right; }
.signature-box.right .sub  { color: #444444; text-align: right; }
.mt-12 { margin-top: 12px; }

.hint { color: #666666; font-style: italic; margin-top: 8px; }

/* Print */
#print-sheet { display: none; }

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #ffffff; padding: 0; }
  .form-container { display: none; }
  #print-sheet { display: block; }
}

/* Printable sheet styles */
#print-sheet {
  font: 12px/1.35 "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #111111;
}
.print-header {
  display: grid;
  grid-template-columns: 120px 1fr 1fr 1fr;
  gap: 12px; align-items: center;
  border-bottom: 2px solid #0F4C81;
  padding-bottom: 8px; margin-bottom: 8px;
}
.print-logo { width: 90px; }
.print-title { text-align: center; color: #0F4C81; font-weight: 800; font-size: 18px; }
.print-meta { text-align: right; }

.print-table { width: 100%; border-collapse: collapse; table-layout: fixed; margin-top: 4px; }
.print-table th, .print-table td { border: 1px solid #999999; padding: 4px; vertical-align: top; }
.print-table th { background: #e9f1f8; color: #0b3a5c; font-weight: 800; }
.small { font-size: 11px; color: #333333; }

.print-footer {
  display: flex; justify-content: space-between;
  margin-top: 10px; border-top: 2px solid #0F4C81; padding-top: 8px;
}
