/* Basic reset */

* {
  box-sizing: border-box;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

body {
  margin: 0;
  background: #f3f4f6;
  color: #111;
}

.center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* App layout */

.app {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

/* Increased width to utilize more horizontal space */

.card {
  width: 1160px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(2,6,23,0.08);
  overflow: hidden;
}

/* Header */

.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid #eef2f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.logged-as {
  font-size: 14px;
  color: #4b5563;
}

/* Main */

/* Adjusted grid columns for wider panel */

.card-body {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
  padding: 24px;
}

.panel {
  padding: 12px;
}

.panel h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
}

/* Login (Input Forms - Standard Size) */

.login-box {
  max-width: 340px;
  margin: 0 auto;
}

label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: #334155;
}

input[type="text"], input[type="password"], input[type="date"], textarea, select {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 12px;
  border: 1px solid #e6eef6;
  border-radius: 6px;
  font-size: 14px;
}

button {
  background: #0ea5a4;
  color: #fff;
  border: 0;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

button.ghost {
  background: #eef2f7;
  color: #0f172a;
}

/* Hide Demo Button */

#fillDemo {
  display: none !important;
}

/* Input Form Purpose Tags (Keep these small for the form) */

.purposes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.purposes label {
  background: #f1f5f9;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
}

/* Preview Panel Wrapper for Scaling */

.card-body .panel:nth-child(2) {
  overflow: hidden;
  max-height: 1000px;
}

/* --- NOC PREVIEW STYLES (2016px x 2688px OUTPUT DIMENSIONS) --- */

.noc-preview {
  background: #fff;
  border: 1px solid #e6eef6;
  border-radius: 6px;
  position: relative;
  max-width: 2016px;
  min-height: 2688px;
  width: 2016px;
  padding: 150px 200px 50px 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: scale(0.35);
  transform-origin: top left;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border-radius: 30px;
}

/* Scaled Watermark */

#watermark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  opacity: 0.06;
  width: 1500px;
  height: 1500px;
  object-fit: contain;
  pointer-events: none;
}

/* Scaled Header - CONDENSED MARGIN */

.noc-head {
  text-align: center;
  margin-bottom: 40px;
  padding-top: 40px;
}

.noc-head div {
  margin: 0;
  font-size: 60px;
}

/* Encapsulates the main content */

.noc-body {
  font-size: 40px;
  line-height: 1.6;
  color: #0f172a;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Specific targeting for NOC Title size */

.noc-body > div:nth-child(1) > div:nth-child(1) {
  font-size: 50px !important;
}

/* CONDENSED MARGIN */

.noc-date-row {
  text-align: left;
  margin-bottom: 20px;
  margin-top: 80px;
}

.noc-field {
  margin: 20px 0;
}

/* Scaled Meta block lines - CONDENSED MARGIN */

.meta-block {
  margin-top: 40px;
  padding: 30px 0;
  border-top: 3px dashed #ddd;
  border-bottom: 3px dashed #ddd;
}

/* 💥 PREVIEW PURPOSE TAGS (Scaled for high-res output, overriding the small form styles) 💥 */

.noc-preview .purposes {
  gap: 20px;
  margin-top: 20px;
}

.noc-preview .purposes label {
  padding: 15px 20px;
  border-radius: 10px;
  font-size: 30px;
  display: inline-block;
}

/* Footer layout - CONDENSED MARGIN */

.footer-row {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  width: 100%;
  margin-bottom: 140px;
}

.footer-col {
  flex-basis: 33.33%;
}

/* Scaled Images */

.seal {
  width: 250px;
  height: 250px;
  object-fit: contain;
}

.signature {
  height: 200px;
  max-width: 400px;
  width: auto;
  object-fit: contain;
}

/* Scaled Footer Text */

#issuerBlock {
  font-size: 40px;
}

#issuerDept {
  font-size: 36px !important;
}

/* Scaled Final Note - CONDENSED MARGIN */

.final-note {
  padding-top: 30px;
  border-top: 3px solid #eef2f7;
  font-size: 32px;
  color: #64748b;
  line-height: 1.4;
  text-align: center;
  margin-top: 40px;
  padding-bottom: 80px;
}

/* --- SMALL HELPERS (Scaled) --- */

.muted {
  color: #475569;
  font-size: 36px;
}

.hidden {
  display: none;
}

.note {
  font-size: 13px;
  color: #64748b;
}

/* Responsive */

/* Revert ALL scaling for usable screen preview on small devices */

@media (max-width:1100px) {
  .card {
    width: 100%;
  }
}

@media (max-width:1100px) {
  .noc-preview {
    max-width: 100%;
    min-height: auto;
    width: auto;
    display: block;
    padding: 30px 40px;
    transform: none;
    margin: 0 auto;
  }
}

/* Reset internal scaling for small screens */

@media (max-width:1100px) {
  .noc-body {
    font-size: 16px;
  }
}

@media (max-width:1100px) {
  .noc-head {
    margin-bottom: 24px;
    padding-top: 30px;
  }
}

@media (max-width:1100px) {
  .noc-head div {
    font-size: 24px;
  }
}

@media (max-width:1100px) {
  .noc-body > div:nth-child(1) > div:nth-child(1) {
    font-size: 18px !important;
  }
}

@media (max-width:1100px) {
  .noc-date-row {
    margin-bottom: 15px;
    margin-top: 20px;
  }
}

@media (max-width:1100px) {
  .noc-field {
    margin: 10px 0;
  }
}

@media (max-width:1100px) {
  .meta-block {
    margin-top: 20px;
    padding: 10px 0;
    border-top: 1px dashed #ddd;
    border-bottom: 1px dashed #ddd;
  }
}

@media (max-width:1100px) {
  .purposes label {
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 14px;
  }
}

/* Reset purpose labels */

@media (max-width:1100px) {
  .footer-row {
    margin-bottom: 70px;
  }
}

@media (max-width:1100px) {
  .seal {
    width: 90px;
    height: 90px;
  }
}

@media (max-width:1100px) {
  .signature {
    height: 70px;
    max-width: 150px;
  }
}

@media (max-width:1100px) {
  .final-note {
    padding-top: 15px;
    border-top: 1px solid #eef2f7;
    font-size: 13px;
    margin-top: 30px;
    padding-bottom: 30px;
    position: relative;
  }
}

@media (max-width:1100px) {
  .muted {
    font-size: 14px;
  }
}

@media (max-width:980px) {
  .card-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width:980px) {
  .card {
    width: 100%;
    border-radius: 0;
  }
}

