/* --- Body and General --- */
body {
  margin: 0px;
  padding: 0;
  font-family: Calibri, sans-serif;
  background: white;
  font-size: 14px;
  line-height: 1.5;
}

p {
  margin: 0;
}

.letter-container {
  width: 210mm;
  height: 297mm;
  margin: 0 auto 20px;
  padding: 0;
  box-sizing: border-box;
  position: relative;
  background: white;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

/* --- Letterhead --- */
.letterhead {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px 0;
  box-sizing: border-box;
  height: 90px;
  position: relative;
  background: white;
}

.letterhead-left img {
  height: 80px;
}


.letterhead-right{text-align:right;font-size:14px;line-height:1.4;}

.letterhead-right p {
  margin: -5px;
}

/* --- Header Divider --- */
.header-divider {
  width: 100%;
  height: 3px;
  display: flex;
  margin-top: 8px;
}

.header-dividerbottom {
  width: 100%;
  height: 1px;
  display: flex;
  margin-top: 6px;
}
.header-dividerbottom .left {
  flex: 0.5;
  background-color: #40B8B3;
}

.header-dividerbottom .right {
  flex: 0.5;
  background-color: #125069;
}

.header-divider .left {
  flex: 0.5;
  background-color: #40B8B3;
}

.header-divider .right {
  flex: 0.5;
  background-color: #125069;
}
.headerAAA {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center; /* ensures title is in the visual center */

  padding: 5px 10px; /* reduced space for compactness */
  margin-top: 5px;

}
/* --- Barcode in Header --- */
.headerAAA .barcode {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}



/* --- Title stays centered --- */
.headerAAA .title {
  font-weight: bold;
  font-size: 25px;
  text-transform: uppercase;
  text-align: center;
  text-decoration: underline;
  /* keep centered, no changes needed */
}

/* --- Date stays right aligned --- */
.headerAAA .datetime {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  white-space: nowrap;
}



/* --- Token Info (Right Aligned) --- */
.token-info {
  margin-top:50px;
  margin: 4px 10px 6px 10px;

}

.token-box {
  display: inline-block;
  border: 1px solid #000;
  padding: 3px 12px;
  font-size: 14px;
    border-radius: 50px;
}

/* --- Details Section (Patient & Visit) --- */
.details {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 6px 10px;
  margin-top: -10px;
  gap: 15px;
}
.headerAAA{
    width: 100%;
  padding: 0;
  box-sizing: border-box;
  border-top: 1px solid #000;
  color: #125069;
}
.details{
    width: 100%;
  
  box-sizing: border-box;
  border-bottom: 1px solid #000;
 color: #125069;
}
.section {
  width: 48%;
  padding: 0;
  box-sizing: border-box;
  border: none; /* Removed inner borders */
}

.section h3 {
  margin-top: 0;
  margin-bottom: 4px;
  border-bottom: 0.1px solid #40B8B3;
  padding-bottom: 3px;
  font-size: 15px;
  color: #125069;
}

/* --- Label & Value Alignment --- */
.section p {
  display: flex;
  justify-content: flex-start;
  margin: 2px 0;
  line-height: 1.3;
  font-size: 13.5px;
}

.section .label {
  font-weight: bold;
  min-width: 130px; /* All values start at same vertical line */
}

.section .value {
  flex: 1;
}

/* --- Highlight class --- */
.highlight {
  background-color: #e3f6d5;
  font-weight: bold;
  color: #042aa9;
}

/* --- Content & Headers --- */
.content, .header-info {
  padding: 10mm 15mm 10mm;
  min-height: calc(100% - 160px);
  box-sizing: border-box;
  text-align: justify;
}

.content p, .header-info p {
  font-size: 15px;
  margin: 0;
}

.header-info {
  text-align: center;
  margin-bottom: 1px;
  margin-top: -30px;
}

h3 {
  font-size: 17px;
  margin-top: 20px;
}

/* --- Media Print --- */
@media print {
  body {
    background: white;
    font-size: 13px;
  }

  @page {
    size: A4 portrait;
    margin: 0;
  }

  .letter-container {
    box-shadow: none;
    margin: 0;
    page-break-after: always;
  }

  .no-print {
    display: none !important;
  }
}
