/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* Layout */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    height: 100vh;
    background-color: #f0f2f5;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    width: 180px;
    background-color: #2e3f56;
    color: white;
    padding: 20px;
    gap: 6px;
}

.sidebar .menu-btn {
    background: none;
    border: none;
    color: white;
    text-align: left;
    padding: 10px 12px;
    margin: 2px 0;
    font-size: 15px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
}

.sidebar .menu-btn:hover,
.sidebar .menu-btn.active {
    background-color: #2563eb;
}

/* bottom area */
.sidebar-bottom { margin-top: auto; width: 100%; }

/* Main content */
.main-content {
    flex: 1;
    padding: 32px;
    background-color: #f9fafb;
    overflow-y: auto;
}

/* LHE file browser row */
.file-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  max-width: 800px;
}

.file-path {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  color: #374151;
  cursor: pointer; /* indicates clickable to open picker */
}

.file-info {
  margin-top: 18px;
  max-width: 800px;
  background: #ffffff;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  border: 1px solid #e6edf3;
  font-size: 14px;
  line-height: 1.5;
}

/* simple button appearance (matches sidebar hover color) */
.btn {
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  cursor: pointer;
  font-size: 14px;
}


.btn.loading {
  opacity: 0.7;
  pointer-events: none;   /* prevents clicks while loading */
  cursor: wait;
  filter: grayscale(10%);
  /* background is controlled here instead of inline */
  background-color: #464646;
  color: #fff;
}


/* optional nice fade */
.btn { transition: opacity 150ms, filter 150ms, background-color 150ms; }

.btn:hover { background: #83adff; }


/* page blocks */
.page { display: none; opacity: 0; }

/* --- single rule that causes the tiny fade-in --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page.active { display: block; animation: fadeIn 220ms ease both; }

/* small typographic */
.page h1 { font-size: 28px; margin-bottom: 14px; color: #111827; }
.page p { color: #374151; line-height: 1.5; margin-bottom: 10px; }

/* Responsive */
@media (max-width: 768px) {
    body { flex-direction: column; }
    .sidebar { width: 100%; flex-direction: row; overflow-x: auto; padding: 10px; }
    .sidebar .menu-btn { flex: 1; text-align: center; margin: 0 4px; }
    .sidebar-bottom { display: none; }
    .main-content { padding: 16px; }
}


/* LHE controls (modern form/grid) */
.controls {
  margin-top: 18px;
  max-width: 800px;
  background: #ffffff;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  border: 1px solid #e6edf3;
}

.controls .section-title {
  font-size: 18px;
  margin-bottom: 10px;
  color: #0f172a;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.label-text {
  font-size: 13px;
  color: #374151;
  margin-bottom: 6px;
}

.form-field input,
.form-field select {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  font-size: 14px;
  color: #111827;
  outline: none;
  transition: box-shadow .12s, border-color .12s;
}

.form-field input:focus,
.form-field select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37,99,235,0.06);
}

.generate-btn {
  padding: 10px 16px;
  border-radius: 8px;
  width: 200px;
  border: none;
  background: linear-gradient(180deg,#2563eb,#1e40af);
  color: white;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(37,99,235,0.14);
}
.generate-btn:disabled {
  opacity: 0.6;
  cursor: default;
  box-shadow: none;
}

/* small responsive tweak to keep inputs readable on narrow screens */
@media (max-width: 520px) {
  .form-grid { grid-template-columns: 1fr; }
}
