/* style.css - OpenClaw PHP - Modern, Fashionable, User-friendly UI */

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-color: #f8fafc;
  --sidebar-bg: #ffffff;
  --chat-bubble-user: #2563eb;
  --chat-bubble-assistant: #f1f5f9;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --radius-lg: 12px;
  --radius-md: 8px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

@keyframes pulse {
  0% { opacity: 0.4; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.4; transform: scale(0.95); }
}

@keyframes liveDots {
  0%, 20% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-1px); }
  100% { opacity: 0.25; transform: translateY(0); }
}

@keyframes caretBlink {
  0%, 45% { opacity: 0; }
  50%, 95% { opacity: 1; }
  100% { opacity: 0; }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  height: 60px;
  background-color: #fff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  margin-left: 16px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.nav-link:hover {
  background-color: var(--bg-color);
  color: var(--primary-color);
}

/* Container */
.container {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.admin-layout-main {
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 16px;
}

.btn-new-chat {
  width: 100%;
  padding: 10px;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}

.btn-new-chat:hover {
  background-color: var(--primary-hover);
}

.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.chat-item {
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.chat-item:hover {
  background-color: var(--bg-color);
}

.chat-item.active {
  background-color: #eff6ff;
  border: 1px solid #dbeafe;
}

.chat-item-title {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}

/* Chat Main Area */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  position: relative;
}

.chat-top-bar {
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.chat-top-bar-main,
.chat-top-bar-status,
.chat-top-bar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-wrap: wrap;
}

.chat-top-bar-main {
  flex: 1 1 380px;
}

.chat-top-bar-status {
  flex: 999 1 420px;
}

.chat-top-bar-actions {
  margin-left: auto;
  justify-content: flex-end;
}

.select-model, .select-role {
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 14px;
  background-color: #fff;
  min-width: 0;
}

.select-model {
  flex: 1 1 260px;
  max-width: 420px;
}

.select-role {
  flex: 0 1 180px;
  max-width: 220px;
}

#roleModeIndicator,
#effectiveModelIndicator {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Messages */
.message {
  max-width: 80%;
  display: flex;
  flex-direction: column;
}

.message-user {
  align-self: flex-end;
}

.message-assistant {
  align-self: flex-start;
}

.message-content {
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 15px;
  position: relative;
  overflow-wrap: anywhere;
}

.message-user .message-content {
  background-color: var(--chat-bubble-user);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.message-assistant .message-content {
  background-color: var(--chat-bubble-assistant);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
}

.message-actions {
  margin-top: 4px;
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.message-action-btn {
  cursor: pointer;
}

.message-action-btn:hover {
  color: var(--primary-color);
}

.message-live-indicator {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.16);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
}

.message-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #2563eb;
  animation: pulse 1.2s infinite;
}

.message-live-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.message-live-dots span {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.25;
  animation: liveDots 1.2s infinite ease-in-out;
}

.message-live-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.message-live-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.message-content-live {
  position: relative;
  border-left: 3px solid rgba(56, 189, 248, 0.9);
  padding-left: 12px;
}

.message-content-live::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 4px;
  vertical-align: -2px;
  background: #38bdf8;
  border-radius: 999px;
  animation: caretBlink 1s infinite;
}

.message-content p {
  margin: 0 0 10px;
}

.message-content p:last-child {
  margin-bottom: 0;
}

.message-content pre {
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #0f172a;
  color: #e2e8f0;
  overflow-x: auto;
}

.message-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.message-content :not(pre) > code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.18);
  color: #0f172a;
}

.message-content ul,
.message-content ol {
  padding-left: 20px;
  margin: 8px 0;
}

.message-content blockquote {
  margin: 10px 0;
  padding-left: 12px;
  border-left: 3px solid #cbd5e1;
  color: #475569;
}

.message-content strong {
  font-weight: 700;
}

.message-content h1,
.message-content h2,
.message-content h3,
.message-content h4,
.message-content h5,
.message-content h6 {
  margin: 10px 0 8px;
  line-height: 1.35;
}

.message-content h1 { font-size: 24px; }
.message-content h2 { font-size: 22px; }
.message-content h3 { font-size: 20px; }
.message-content h4 { font-size: 18px; }
.message-content h5 { font-size: 16px; }
.message-content h6 { font-size: 14px; }

.message-content a {
  color: #2563eb;
  text-decoration: underline;
}

.message-content hr {
  margin: 14px 0;
  border: 0;
  border-top: 1px solid #cbd5e1;
}

.message-content .task-list {
  list-style: none;
  padding-left: 0;
}

.message-content .task-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}

.message-attachments {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.message-edited-badge {
  margin-top: 6px;
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(148, 163, 184, 0.12);
  color: #475569;
}

.message-attachment-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 12px;
}

.message-attachment-generated {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(360px, 100%);
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.24);
  gap: 10px;
}

.message-assistant .message-attachment-generated {
  background: #fff;
}

.message-attachment-generated-image {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.message-attachment-generated-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.message-attachment-generated-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.message-inline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.message-inline-btn:hover {
  background: #eff6ff;
}

.message-user .message-attachment-item {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.message-attachment-name {
  font-weight: 600;
}

.message-attachment-type {
  opacity: 0.8;
}

.message-attachment-thumb {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.message-reference-list {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.message-reference-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: #dbeafe;
  color: #1d4ed8;
}

.code-block {
  position: relative;
  margin: 10px 0;
}

.code-block pre {
  margin: 0;
}

.code-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
}

.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.token-keyword {
  color: #93c5fd;
}

.token-string {
  color: #86efac;
}

.token-number {
  color: #fca5a5;
}

.token-comment {
  color: #94a3b8;
}

.table-wrap {
  margin: 10px 0;
  overflow-x: auto;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  overflow: hidden;
}

.table-wrap th,
.table-wrap td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.table-wrap th {
  background: #eff6ff;
  font-weight: 700;
}

.footnotes {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
  font-size: 13px;
  color: #475569;
}

.footnote-item {
  margin-top: 6px;
}

.footnote-ref {
  color: #2563eb;
}

/* Chat Input */
.chat-input-container {
  padding: 24px;
  background-color: #fff;
  border-top: 1px solid var(--border-color);
  width: 100%;
}

.chat-input-wrapper {
  width: 100%;
  max-width: none;
  margin: 0;
  position: relative;
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.chat-input-textarea {
  width: 100%;
  border: none;
  resize: none;
  outline: none;
  font-size: 15px;
  min-height: 40px;
  max-height: 200px;
}

.chat-input-toolbar {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  border: 1px solid #bfdbfe;
}

.attachment-name {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-remove {
  border: none;
  background: none;
  color: #1d4ed8;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.toolbar-left {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-right {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.toolbar-btn {
  padding: 6px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.2s;
}

.toolbar-btn:hover {
  background-color: var(--bg-color);
  color: var(--primary-color);
}

.btn-send {
  padding: 8px 16px;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
}

.btn-send:hover {
  background-color: var(--primary-hover);
}

@media (max-width: 1200px) {
  .chat-top-bar-actions {
    margin-left: 0;
  }
}

@media (max-width: 900px) {
  .chat-top-bar {
    padding: 12px 16px;
    gap: 12px;
  }

  .chat-history,
  .chat-input-container {
    padding: 16px;
  }

  .chat-top-bar-main,
  .chat-top-bar-status,
  .chat-top-bar-actions {
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .select-model,
  .select-role {
    max-width: none;
  }

  .toolbar-right {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .workflow-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-detail-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .workflow-action-panel {
    flex: 1 1 100%;
    min-width: 0;
  }

  .workflow-action-panel .workflow-detail-actions {
    flex-direction: row;
  }

  .workflow-action-panel .workflow-action-link {
    width: auto;
  }
}

@media (max-width: 640px) {
  .sidebar {
    width: 220px;
  }

  .message {
    max-width: 92%;
  }

  .chat-top-bar-main {
    flex-direction: column;
    align-items: stretch;
  }

  .chat-top-bar-status {
    flex-direction: column;
    align-items: stretch;
  }

  #roleModeIndicator,
  #effectiveModelIndicator {
    white-space: normal;
  }

  .chat-input-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-left,
  .toolbar-right {
    width: 100%;
    justify-content: flex-start;
  }

  .toolbar-right .btn-secondary,
  .toolbar-right .btn-send {
    width: 100%;
  }

  .agent-confirm-modal-content {
    width: calc(100vw - 20px);
    max-height: 88vh;
    padding: 16px;
  }

  .agent-confirm-body {
    max-height: calc(88vh - 142px);
  }

  .agent-confirm-modal-content .modal-footer {
    flex-direction: column;
  }

  .agent-confirm-modal-content .modal-footer .btn-secondary,
  .agent-confirm-modal-content .modal-footer .btn-primary {
    width: 100%;
  }

  .workflow-summary-grid {
    grid-template-columns: 1fr;
  }

  .workflow-detail-actions a {
    width: 100%;
    text-align: center;
  }

  .workflow-action-panel .workflow-detail-actions {
    flex-direction: column;
  }

  .workflow-action-panel .workflow-action-link {
    width: 100%;
  }
}

/* Footer */
.footer {
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  background-color: #fff;
  border-top: 1px solid var(--border-color);
}

/* Dashboard Styles */
.dashboard-container {
  width: 100%;
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 24px;
  padding-bottom: 32px;
}

.card {
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
}

.workflow-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.workflow-detail-heading {
  flex: 1 1 540px;
  min-width: 0;
}

.workflow-action-panel {
  flex: 0 0 260px;
  min-width: 240px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  box-shadow: var(--shadow-sm);
}

.workflow-action-title {
  font-size: 13px;
  font-weight: 700;
  color: #1d4ed8;
  margin-bottom: 10px;
}

.workflow-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
}

.workflow-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.workflow-action-panel .workflow-detail-actions {
  flex-direction: column;
}

.workflow-action-panel .workflow-action-link {
  width: 100%;
}

.workflow-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.workflow-step-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.workflow-step-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.workflow-scroll-panel {
  max-height: 240px;
  overflow: auto;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.workflow-user-input-preview {
  max-height: 220px;
}

.workflow-final-answer {
  max-height: 180px;
  font-size: 14px;
  font-weight: 600;
}

.workflow-rich-text {
  color: #334155;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.workflow-rich-text p {
  margin: 0 0 10px;
}

.workflow-rich-text p:last-child {
  margin-bottom: 0;
}

.workflow-rich-text ul,
.workflow-rich-text ol {
  margin: 0 0 10px;
  padding-left: 20px;
}

.workflow-rich-text li + li {
  margin-top: 6px;
}

.workflow-empty-text {
  color: #94a3b8;
  font-size: 13px;
}

.workflow-mono-panel {
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.workflow-raw-response {
  background: #0f172a;
  color: #e2e8f0;
  border-color: #1e293b;
  max-height: 320px;
}

.workflow-error-panel {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
  max-height: 220px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--primary-color);
}

.btn-primary {
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
}

/* Auth Pages */
.auth-page {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--bg-color);
}

.auth-card {
  width: 400px;
  background-color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.auth-title {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 32px;
  color: var(--primary-color);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: #fff;
  border-radius: var(--radius-lg);
  width: 500px;
  max-width: 90%;
  padding: 24px;
  box-shadow: var(--shadow-md);
  transform: translateY(-20px);
  transition: all 0.2s;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  cursor: pointer;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  line-height: 1;
}

.modal-footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.agent-confirm-modal-content {
  width: min(720px, calc(100vw - 32px));
  max-height: min(82vh, 900px);
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.agent-confirm-modal-content .modal-header {
  margin-bottom: 14px;
  flex-shrink: 0;
}

.agent-confirm-body {
  font-size: 14px;
  color: var(--text-main);
  overflow-y: auto;
  max-height: calc(82vh - 150px);
  padding-right: 6px;
}

.agent-confirm-body ol {
  max-height: 32vh;
  overflow-y: auto;
  padding-right: 4px;
}

.agent-confirm-body pre {
  white-space: pre-wrap;
  background: #f8fafc;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  overflow-x: auto;
}

.agent-confirm-raw {
  margin-top: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  overflow: hidden;
}

.agent-confirm-raw summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 600;
  color: #475569;
  list-style: none;
}

.agent-confirm-raw summary::-webkit-details-marker {
  display: none;
}

.agent-confirm-raw pre {
  margin: 0 12px 12px 12px;
}

.agent-confirm-modal-content .modal-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  background: #fff;
  flex-shrink: 0;
}

.btn-secondary {
  padding: 10px 20px;
  background-color: #f1f5f9;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
}
