/* Thai PDF preview: Sarabun + Noto Sans Thai via fonts.googleapis.com (see index.html) */

.app-hero {
  text-align: center;
  padding: 40px 0 20px;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-400);
  padding: 6px 16px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 16px;
}

.layout-grid {
  display: grid;
  grid-template-columns: 250px 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
  align-items: start;
}

/* Sidebar */
.doc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-list li {
  padding: 12px 16px;
  background: var(--navy-800);
  border: 1px solid var(--navy-600);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 15px;
}

.doc-list li:hover {
  border-color: var(--blue-400);
  background: var(--navy-700);
}

.doc-list li.active {
  background: var(--blue-600);
  border-color: var(--blue-500);
  color: white;
}

/* Form */
.form-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--navy-600);
}

/* Preview */
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--navy-600);
}

.paper {
  background: #ffffff;
  color: #000000;
  padding: 50px 40px;
  border-radius: 4px;
  min-height: 700px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  /* Sarabun (Google Fonts) = มาตรฐานเอกสารไทย โหลดผ่าน gstatic ใช้กับ html2canvas ได้ดีกว่า CDN fontsource */
  font-family: 'Sarabun', 'Noto Sans Thai', 'TH Sarabun New', sans-serif;
  line-height: 1.5;
  font-size: 16px;
  overflow-x: auto;
  -webkit-font-smoothing: antialiased;
}

.paper h1 {
  text-align: center;
  font-size: 22px;
  color: black;
  margin-bottom: 24px;
  font-weight: bold;
}

.paper p {
  color: black;
  margin-bottom: 10px;
  text-indent: 30px;
  text-align: justify;
}

.paper .signatures {
  margin-top: 50px;
  display: flex;
  justify-content: space-between;
}

.paper .signature-box {
  text-align: center;
}

.paper .signature-box p {
  text-indent: 0;
  text-align: center;
  margin-bottom: 4px;
}

.paper .line {
  display: inline-block;
  width: 150px;
  border-bottom: 1px dotted black;
  margin-bottom: 8px;
}

@media (max-width: 1024px) {
  .layout-grid {
    grid-template-columns: 200px 1fr;
  }
  .preview-section {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }
}
