/* BioStudio AI — Data Organizer
   Scoped under .do-app so styles never leak into the rest of the OS shell. */

.do-app {
  --do-primary: #2f6bd4;
  --do-primary-hover: #295ec0;
  --do-excel: #21a366;
  --do-excel-hover: #1c8f59;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--app-bg, #171a23);
  color: var(--app-fg, #e8eaf0);
  font-family: inherit;
}

/* Header */
.do-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, #2a2f3d);
}
.do-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.do-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.do-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
}
.do-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}
.do-brand-text {
  min-width: 0;
}
.do-brand-text h1 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.do-subtitle {
  margin: 2px 0 0;
  font-size: 0.76rem;
  opacity: 0.6;
}

/* Controls */
.do-controls {
  padding: 14px 16px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid var(--border, #2a2f3d);
}

.do-instr,
.do-input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border, #2a2f3d);
  background: var(--app-panel, #1f2330);
  color: inherit;
  font: inherit;
  outline: none;
}
.do-instr {
  padding: 10px 13px;
}
.do-input {
  padding: 11px 13px;
  min-height: 120px;
  max-height: 280px;
  resize: vertical;
  line-height: 1.45;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  white-space: pre;
  overflow: auto;
}
.do-instr:focus,
.do-input:focus {
  border-color: var(--do-primary);
}

.do-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.do-spacer {
  flex: 1;
}

/* Status line */
.do-status {
  min-height: 18px;
  font-size: 0.8rem;
  opacity: 0.75;
}
.do-status.do-ok {
  color: #4ade80;
  opacity: 1;
}
.do-status.do-warn {
  color: #fbbf24;
  opacity: 1;
}
.do-status.do-error {
  color: #ff6b6b;
  opacity: 1;
}

/* Result area */
.do-result {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.do-empty {
  margin: auto;
  text-align: center;
  opacity: 0.55;
}
.do-empty .do-hint {
  font-size: 0.82rem;
  opacity: 0.8;
}
.do-result-bar {
  display: flex;
  align-items: center;
}
.do-result-count {
  font-size: 0.78rem;
  opacity: 0.65;
}

.do-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--border, #2a2f3d);
  border-radius: 10px;
}
.do-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85rem;
}
.do-table th,
.do-table td {
  border: 1px solid var(--border, #2a2f3d);
  padding: 7px 10px;
  text-align: left;
  white-space: nowrap;
  vertical-align: top;
}
.do-table thead th {
  position: sticky;
  top: 0;
  background: var(--app-panel, #232838);
  font-weight: 600;
  z-index: 1;
}
.do-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.025);
}

/* Buttons */
.do-btn {
  border: none;
  cursor: pointer;
  font: inherit;
  border-radius: 12px;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.do-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.do-btn-primary {
  background: var(--do-primary);
  color: #fff;
  padding: 9px 20px;
  font-weight: 600;
}
.do-btn-primary:hover:not(:disabled) {
  background: var(--do-primary-hover);
}
.do-btn-excel {
  background: var(--do-excel);
  color: #fff;
  padding: 8px 16px;
  font-weight: 600;
}
.do-btn-excel:hover:not(:disabled) {
  background: var(--do-excel-hover);
}
.do-btn-ghost {
  background: transparent;
  color: inherit;
  border: 1px solid var(--border, #2a2f3d);
  padding: 8px 14px;
  opacity: 0.75;
}
.do-btn-ghost:hover {
  opacity: 1;
}
.do-btn-chip {
  background: var(--app-panel, #1f2330);
  color: inherit;
  border: 1px solid var(--border, #2a2f3d);
  padding: 8px 14px;
  font-size: 0.82rem;
}
.do-btn-chip:hover:not(:disabled) {
  border-color: var(--do-primary);
  color: var(--do-primary);
}
