.at-card { padding: 28px; }
.at-title-bar { background: linear-gradient(135deg, var(--site-dark) 0%, var(--site-dark-2) 100%); border-radius: 10px 10px 0 0; padding: 18px 24px; margin: -28px -28px 24px; }
.at-title-bar h1 { color: #fff; margin: 0; font-size: 1.4em; text-align: center; }

/* ===== Request row ===== */
.at-request-row { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.at-method-select { border: 1px solid #ddd; border-radius: 8px; padding: 10px 12px; font-weight: 700; font-family: "Courier New", monospace; background: #fafbfc; color: var(--site-dark); flex: 0 0 110px; }
.at-url-input { flex: 1 1 300px; min-width: 0; border: 1px solid #ddd; border-radius: 8px; padding: 10px 14px; font-family: "Courier New", monospace; font-size: .95em; }
.at-url-input:focus, .at-method-select:focus { outline: none; border-color: var(--site-light); box-shadow: 0 0 0 3px rgba(20, 184, 166, .12); }
.at-send-btn { display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: 8px; padding: 10px 24px; font-weight: 700; font-size: .95em; cursor: pointer; background: var(--site-light); color: #fff; transition: background .2s ease; flex: 0 0 auto; }
.at-send-btn:hover { background: var(--site-dark); }
.at-send-btn:disabled { background: #a5a6c9; cursor: default; }

/* ===== Tabs ===== */
.at-tabs { display: flex; gap: 4px; border-bottom: 1px solid #eee; margin-bottom: 16px; flex-wrap: wrap; }
.at-tab-btn { background: none; border: none; border-bottom: 2px solid transparent; padding: 9px 16px; font-weight: 600; font-size: .88em; color: #6b7280; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.at-tab-btn:hover { color: var(--site-dark); }
.at-tab-btn.active { color: var(--site-dark); border-bottom-color: var(--site-dark); }
.at-tab-count { background: #eef0ff; color: var(--site-dark); border-radius: 20px; padding: 1px 8px; font-size: .82em; font-weight: 700; }
.at-tab-panel.hide { display: none; }

/* ===== Key/value rows (headers, params) ===== */
.at-kv-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.at-kv-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.at-kv-row input { border: 1px solid #ddd; border-radius: 8px; padding: 8px 12px; font-family: "Courier New", monospace; font-size: .9em; min-width: 0; }
.at-kv-row input:focus { outline: none; border-color: var(--site-light); box-shadow: 0 0 0 3px rgba(20, 184, 166, .12); }
.at-kv-remove-btn { background: none; border: 1px solid #eee; border-radius: 8px; padding: 8px 11px; color: var(--site-danger); cursor: pointer; }
.at-kv-remove-btn:hover { background: var(--site-danger-bg); border-color: var(--site-danger-border); }
.at-add-row-btn { background: none; border: 1px dashed #ccc; border-radius: 20px; padding: 7px 16px; font-size: .85em; font-weight: 600; color: var(--site-dark); cursor: pointer; }
.at-add-row-btn:hover { background: #f0fdfa; border-color: var(--site-light); }

/* ===== Body tab ===== */
.at-body-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.at-format-btn { display: inline-flex; align-items: center; gap: 7px; background: none; border: 1px solid #ddd; border-radius: 20px; padding: 7px 16px; font-size: .85em; font-weight: 600; color: var(--site-dark); cursor: pointer; }
.at-format-btn:hover { background: #f0fdfa; border-color: var(--site-light); }
.at-body-error { font-size: .82em; color: var(--site-danger); font-weight: 600; }
.at-body-error.hide { display: none; }
.at-body-textarea { width: 100%; min-height: 180px; resize: vertical; border: 1px solid #ddd; border-radius: 8px; padding: 12px 14px; font-family: "Courier New", monospace; font-size: .9em; line-height: 1.55; box-sizing: border-box; }
.at-body-textarea:focus { outline: none; border-color: var(--site-light); box-shadow: 0 0 0 3px rgba(20, 184, 166, .12); }

/* ===== Error banner ===== */
.at-error { background: var(--site-danger-bg); border: 1px solid var(--site-danger-border); color: var(--site-danger); border-radius: 8px; padding: 12px 16px; font-size: .9em; margin-top: 6px; }
.at-error.hide { display: none; }
.at-error strong { display: block; margin-bottom: 3px; }

/* ===== Response ===== */
.at-response { margin-top: 22px; border-top: 1px solid #eee; padding-top: 20px; }
.at-response.hide { display: none; }
.at-response-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.at-status-badge { font-weight: 800; font-size: 1.05em; padding: 6px 16px; border-radius: 20px; font-family: "Courier New", monospace; }
.at-status-badge.at-status-2xx { background: var(--site-success-bg); color: var(--site-success); }
.at-status-badge.at-status-3xx { background: #fef3c7; color: #92400e; }
.at-status-badge.at-status-4xx, .at-status-badge.at-status-5xx { background: var(--site-danger-bg); color: var(--site-danger); }
.at-status-badge.at-status-err { background: #f3f4f6; color: #4b5563; }
.at-duration { font-size: .88em; color: #6b7280; font-weight: 600; }

.at-response-tabs { margin-bottom: 12px; }
.at-response-body { border: 1px solid #eee; border-radius: 10px; padding: 14px 16px; background: #fafbfc; font-family: "Courier New", monospace; font-size: .87em; line-height: 1.6; white-space: pre-wrap; word-break: break-word; max-height: 480px; overflow: auto; margin: 0; }
.at-resp-headers { border: 1px solid #eee; border-radius: 10px; padding: 6px 0; max-height: 480px; overflow: auto; }
.at-resp-header-row { display: flex; gap: 10px; padding: 7px 16px; font-size: .86em; border-bottom: 1px solid #f0f1f3; }
.at-resp-header-row:last-child { border-bottom: none; }
.at-resp-header-name { font-weight: 700; color: var(--site-dark); flex: 0 0 220px; word-break: break-word; }
.at-resp-header-value { color: #3d4148; word-break: break-word; font-family: "Courier New", monospace; }

@media (max-width: 700px) {
    .at-kv-row { grid-template-columns: 1fr 1fr; }
    .at-kv-remove-btn { grid-column: 1 / -1; justify-self: end; }
    .at-resp-header-row { flex-direction: column; gap: 2px; }
    .at-resp-header-name { flex-basis: auto; }
}
