.dxlean-app {
  --dxlean-graphite: #181b1f;
  --dxlean-warm-white: #f5f4f0;
  --dxlean-cyan: #00a7c4;
  --dxlean-cyan-light: #dff6fb;
  --dxlean-orange: #ff6b35;
  --dxlean-steel: #68727d;
  --dxlean-border: #cfd5d8;
  box-sizing: border-box;
  max-width: 1180px;
  margin: 18px auto;
  color: var(--dxlean-graphite);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dxlean-app *, .dxlean-app *::before, .dxlean-app *::after { box-sizing: inherit; }
.dxlean-app__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.dxlean-app__header h2 { margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1; }
.dxlean-app__header p { margin: 8px 0 0; color: var(--dxlean-steel); font-size: 16px; }
.dxlean-private-badge { white-space: nowrap; padding: 7px 11px; border-radius: 99px; color: #116173; background: var(--dxlean-cyan-light); font-size: 13px; font-weight: 650; }
.dxlean-workspace { display: grid; grid-template-columns: minmax(280px, 0.42fr) minmax(360px, 0.58fr); gap: 18px; }
.dxlean-source-panel, .dxlean-result-panel { min-width: 0; }
.dxlean-upload-form { display: grid; gap: 12px; }
.dxlean-drop-zone { min-height: 330px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 30px; border: 2px dashed var(--dxlean-cyan); border-radius: 14px; background: #fff; text-align: center; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.dxlean-drop-zone:hover, .dxlean-drop-zone:focus-within, .dxlean-drop-zone.is-dragover { background: var(--dxlean-cyan-light); transform: translateY(-1px); }
.dxlean-drop-zone:focus { outline: 3px solid rgba(0, 167, 196, .25); outline-offset: 2px; }
.dxlean-file-input { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }
.dxlean-drop-zone__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--dxlean-cyan-light); color: #007e96; font-size: 30px; font-weight: 700; }
.dxlean-drop-zone strong { font-size: 19px; }
.dxlean-selected-file { max-width: 100%; color: var(--dxlean-steel); overflow-wrap: anywhere; }
.dxlean-button { min-height: 46px; padding: 9px 16px; border: 1px solid #aeb8bd; border-radius: 8px; background: #fff; color: var(--dxlean-graphite); font: inherit; font-weight: 650; cursor: pointer; }
.dxlean-button:hover:not(:disabled), .dxlean-button:focus-visible { border-color: var(--dxlean-cyan); box-shadow: 0 0 0 3px rgba(0, 167, 196, .18); outline: 0; }
.dxlean-button:disabled { color: #9aa2a7; background: #ececea; cursor: not-allowed; }
.dxlean-button--primary { border-color: var(--dxlean-cyan); background: var(--dxlean-cyan); color: #fff; }
.dxlean-button.is-copied { border-color: #4b9f67; background: #daf2e2; color: #24613a; }
.dxlean-format-note, .dxlean-privacy-note { margin: 10px 4px 0; color: var(--dxlean-steel); font-size: 12px; line-height: 1.45; text-align: center; }
.dxlean-privacy-note { margin-top: 6px; }
.dxlean-result-heading { min-height: 34px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dxlean-result-heading h3 { margin: 0 0 9px; font-size: 17px; }
.dxlean-stats { color: var(--dxlean-steel); font-size: 12px; }
.dxlean-preview { display: block; width: 100%; min-height: 393px; resize: vertical; padding: 14px; border: 1px solid var(--dxlean-border); border-radius: 10px; background: #fff; color: var(--dxlean-graphite); font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.dxlean-preview:focus { border-color: var(--dxlean-cyan); box-shadow: 0 0 0 3px rgba(0, 167, 196, .15); outline: 0; }
.dxlean-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.dxlean-warnings { margin-top: 10px; padding: 10px 12px; border-left: 4px solid var(--dxlean-orange); background: #fff3ed; font-size: 13px; }
.dxlean-warnings ul { margin: 5px 0 0 18px; }
.dxlean-status { margin-top: 14px; padding: 10px 13px; border-radius: 7px; background: var(--dxlean-graphite); color: #fff; font-size: 13px; }
.dxlean-status.is-error { background: #8f2f26; }
.dxlean-history, .dxlean-settings-panel { margin-top: 14px; border: 1px solid var(--dxlean-border); border-radius: 9px; background: #fff; }
.dxlean-history summary, .dxlean-settings-panel summary { padding: 13px 15px; cursor: pointer; font-weight: 650; }
.dxlean-history ul { margin: 0; padding: 0 15px 13px; list-style: none; }
.dxlean-history li { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 0; border-top: 1px solid #e5e8e9; }
.dxlean-history li > span:first-child { min-width: 0; display: grid; }
.dxlean-history li strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dxlean-history li small { color: var(--dxlean-steel); }
.dxlean-history__actions { display: flex; gap: 6px; }
.dxlean-history button { min-height: 36px; padding: 6px 10px; border: 1px solid var(--dxlean-border); border-radius: 6px; background: #fff; cursor: pointer; }
.dxlean-settings-panel { padding-bottom: 8px; }
.dxlean-settings-panel form, .dxlean-diagnostics { padding: 0 15px; }
.dxlean-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 12px 18px; }
.dxlean-settings-grid label { display: grid; gap: 5px; font-weight: 600; }
.dxlean-settings-grid input { width: 100%; }
.dxlean-diagnostics { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; }

@media (max-width: 800px) {
  .dxlean-app { margin: 12px 0; }
  .dxlean-workspace { grid-template-columns: 1fr; }
  .dxlean-drop-zone { min-height: 225px; }
  .dxlean-preview { min-height: 360px; }
  .dxlean-settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .dxlean-app__header { display: block; }
  .dxlean-private-badge { display: inline-block; margin-top: 10px; }
  .dxlean-actions { grid-template-columns: 1fr; }
  .dxlean-history li { align-items: flex-start; flex-direction: column; }
  .dxlean-history__actions { width: 100%; }
  .dxlean-history button { flex: 1; }
}

