.nasi-clg {
  --nasi-clg-accent: var(--btn-primary, #f4b000);
  --nasi-clg-accent-hover: var(--btn-primary-h, #d89d00);
  --nasi-clg-bg: #ffffff;
  --nasi-clg-surface: #ffffff;
  --nasi-clg-border: rgba(0, 0, 0, 0.1);
  --nasi-clg-text: #1f1f1f;
  --nasi-clg-muted: #5f5f5f;
  --nasi-clg-danger: #b42318;
  max-width: 1120px;
  margin: 0 auto;
  color: var(--nasi-clg-text);
}

.nasi-clg * {
  box-sizing: border-box;
}

.nasi-clg-card {
  background: var(--nasi-clg-surface);
  border: 1px solid var(--nasi-clg-border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.nasi-clg-card--hero {
  margin-bottom: 14px;
  background: linear-gradient(120deg, rgba(244, 176, 0, 0.14), rgba(255, 255, 255, 0.98));
}

.nasi-clg-title {
  margin: 0;
  font-size: 1.62rem;
  line-height: 1.2;
}

.nasi-clg-subtitle {
  margin: 8px 0 0;
  color: var(--nasi-clg-muted);
}

.nasi-clg-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 14px;
}

.nasi-clg-chat,
.nasi-clg-output {
  min-height: 560px;
}

.nasi-clg-conversation {
  border: 1px solid var(--nasi-clg-border);
  border-radius: 12px;
  background: #fafafa;
  height: 340px;
  overflow: auto;
  padding: 12px;
  margin-bottom: 10px;
  display: grid;
  gap: 10px;
}

.nasi-clg-msg {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.nasi-clg-msg--user {
  margin-left: auto;
  background: rgba(244, 176, 0, 0.18);
}

.nasi-clg-msg--assistant {
  margin-right: auto;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.09);
}

.nasi-clg-feedback {
  min-height: 22px;
  margin: 0 0 8px;
  color: var(--nasi-clg-muted);
}

.nasi-clg-feedback.is-error {
  color: var(--nasi-clg-danger);
}

.nasi-clg-composer textarea {
  width: 100%;
  border: 1px solid var(--nasi-clg-border);
  border-radius: 10px;
  padding: 12px;
  resize: vertical;
  min-height: 96px;
  font-family: inherit;
  font-size: 0.95rem;
  color: #111111;
}

.nasi-clg-actions {
  margin-top: 10px;
}

.nasi-clg-btn {
  border: 0;
  border-radius: 10px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
  background: #eef2f7;
  color: #1f2937;
}

.nasi-clg-btn--primary {
  background: var(--nasi-clg-accent);
  color: #1f1f1f;
}

.nasi-clg-btn--primary:hover,
.nasi-clg-btn--primary:focus {
  background: var(--nasi-clg-accent-hover);
}

.nasi-clg-doc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.nasi-clg-chip {
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.82rem;
  line-height: 1;
  background: #fff;
  color: #222;
  cursor: pointer;
}

.nasi-clg-chip:hover,
.nasi-clg-chip:focus {
  border-color: var(--nasi-clg-accent);
  background: rgba(244, 176, 0, 0.09);
}

.nasi-clg-doc-wrap {
  border: 1px solid var(--nasi-clg-border);
  border-radius: 12px;
  background: #fafafa;
  padding: 12px;
}

.nasi-clg-doc-wrap p {
  margin: 0;
}

.nasi-clg-doc-block + .nasi-clg-doc-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ececec;
}

.nasi-clg-doc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.nasi-clg-doc-head h4 {
  margin: 0;
}

.nasi-clg-doc {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.94rem;
  line-height: 1.5;
  color: #111;
}

.nasi-clg-email-subject {
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.nasi-clg-reminder {
  margin-top: 8px;
  border: 1px solid rgba(233, 127, 47, 0.3);
  border-radius: 10px;
  background: rgba(233, 127, 47, 0.1);
  color: #5f320a;
  padding: 9px 10px;
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .nasi-clg-layout {
    grid-template-columns: 1fr;
  }

  .nasi-clg-chat,
  .nasi-clg-output {
    min-height: 0;
  }

  .nasi-clg-conversation {
    height: 280px;
  }
}

@media (max-width: 620px) {
  .nasi-clg-card {
    padding: 14px;
  }

  .nasi-clg-doc-actions {
    gap: 6px;
  }

  .nasi-clg-chip {
    width: 100%;
    text-align: center;
  }
}
