:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --code: #ffffff;
  --line: rgba(0, 0, 0, .12);
  --text: #111827;
  --sub: #856259;
  --topbar: #ffffff;
  --primary: #fa9403;
  --muted: #667085;
}

html[data-theme="dark"] {
  --bg: #000;
  --surface: #000;
  --code: #202020;
  --line: rgba(255, 255, 255, .16);
  --text: #e5e7eb;
  --sub: #d9b8a0;
  --topbar: #000;
  --muted: #9ca3af;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.dt-topbar {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--topbar);
  border-bottom: 1px solid var(--line);
}
.dt-brand { display: flex; align-items: center; gap: 12px; }
.dt-logo { display: block; }
.dt-logotop {
  width: 500px;
  max-width: 100%;
  height: auto;
  display: block;
}
.dt-title { color: var(--sub); font-weight: 700; }
.dt-actions { display: flex; gap: 8px; align-items: center; }

button,
.dt-secondary-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 700;
  cursor: pointer;
}
button:hover,
.dt-secondary-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.dt-main {
  width: 100%;
  margin: 18px 0;
  padding: 0 14px 40px;
}

.cf-shell {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.cf-stage,
.cf-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 14px;
}

.cf-stage {
  flex: 1 1 auto;
  min-width: 0;
  order: 1;
}

.cf-panel {
  flex: 0 0 430px;
  width: 430px;
  order: 2;
}

.cf-panel h1,
.cf-panel h2,
.cf-stage h2 {
  margin: 0 0 10px;
  color: var(--sub);
  font-weight: 600;
}

.cf-panel h2 { margin-top: 16px; }

.cf-row { display: grid; gap: 10px; margin-bottom: 12px; }

label { display: block; font-size: 12px; font-weight: 700; }
select,
textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: var(--code);
  color: var(--text);
  font-size: 13px;
}

textarea {
  line-height: 1.55;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  resize: vertical;
}

.cf-actions {
  display: grid;
  gap: 8px;
}

.cf-actions.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cf-head p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.cf-head.out {
  margin-top: 12px;
}

.cf-meta {
  margin: 6px 0 10px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.cf-status {
  min-height: 22px;
  margin: 10px 0 0;
  color: #22c55e;
  font-weight: 700;
}

@media (max-width: 960px) {
  .cf-shell { display: block; }
  .cf-panel {
    width: auto;
    margin-top: 16px;
  }
}

@media (max-width: 560px) {
  .cf-actions.two {
    grid-template-columns: 1fr;
  }
}
