* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', sans-serif; background: #1a1a2e; color: #eee; min-height: 100vh; }

/* Header */
.header { background: #16213e; padding: 20px 30px; border-bottom: 3px solid #0f3460; }
.header h1 { font-size: 1.5rem; color: #00d4ff; }
.header p { color: #888; font-size: 0.85rem; margin-top: 4px; }

/* Layout */
.container { max-width: 1400px; margin: 0 auto; padding: 20px; }
.card { background: #16213e; border-radius: 10px; padding: 20px; margin-bottom: 16px; border: 1px solid #0f3460; }
.card h2 { font-size: 1.1rem; color: #00d4ff; margin-bottom: 12px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }

/* Form */
label { display: block; font-size: 0.8rem; color: #aaa; margin-bottom: 4px; }
input, select { background: #0e1628; border: 1px solid #0f3460; border-radius: 6px; padding: 8px 12px; color: #eee; font-size: 0.9rem; width: 100%; }
input:focus, select:focus { outline: none; border-color: #00d4ff; }
.field { flex: 1; min-width: 150px; }
.field-sm { flex: 0 0 100px; }
.field-md { flex: 0 0 220px; }

/* Buttons */
button { background: #00d4ff; color: #1a1a2e; border: none; border-radius: 6px; padding: 10px 20px; font-weight: 600; cursor: pointer; font-size: 0.9rem; transition: background 0.2s; }
button:hover { background: #00b8e6; }
button:disabled { background: #444; color: #888; cursor: not-allowed; }
.btn-secondary { background: #0f3460; color: #eee; }
.btn-secondary:hover { background: #1a4a7a; }
.btn-detail { background: #8e44ad; color: #fff; padding: 4px 10px; font-size: 0.75rem; border-radius: 4px; }
.btn-detail:hover { background: #9b59b6; }

/* Status badges */
.status { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; margin-left: 10px; }
.status-ok { background: #27ae60; color: #fff; }
.status-err { background: #e74c3c; color: #fff; }
.status-loading { background: #f39c12; color: #fff; }

/* Response */
.response-area { background: #0e1628; border: 1px solid #0f3460; border-radius: 8px; padding: 16px; margin-top: 12px; max-height: 500px; overflow: auto; font-family: 'Cascadia Code', 'Fira Code', monospace; font-size: 0.82rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.meta { display: flex; gap: 20px; margin-top: 10px; font-size: 0.8rem; color: #888; }
.meta span { background: #0e1628; padding: 4px 8px; border-radius: 4px; }

/* Table */
table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 0.8rem; }
th { background: #0f3460; padding: 8px 10px; text-align: left; color: #00d4ff; position: sticky; top: 0; }
td { padding: 7px 10px; border-bottom: 1px solid #1a2a4a; }
tr:hover td { background: #1a2a4a; }
.table-wrap { max-height: 420px; overflow: auto; border-radius: 8px; border: 1px solid #0f3460; }

/* Tabs */
.tabs { display: flex; gap: 4px; margin-top: 12px; }
.tab { padding: 8px 16px; background: #0e1628; border: 1px solid #0f3460; border-bottom: none; border-radius: 6px 6px 0 0; cursor: pointer; font-size: 0.8rem; color: #888; }
.tab.active { background: #16213e; color: #00d4ff; border-color: #00d4ff; border-bottom: 1px solid #16213e; }

/* Pagination */
.pagination { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.pagination button { padding: 6px 12px; font-size: 0.8rem; }
.pagination span { color: #888; font-size: 0.85rem; }

/* Token */
.token-display { font-family: monospace; font-size: 0.7rem; color: #666; word-break: break-all; max-height: 40px; overflow: hidden; margin-top: 6px; }

/* Chips */
.endpoint-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { padding: 8px 14px; background: #0e1628; border: 1px solid #0f3460; border-radius: 20px; font-size: 0.78rem; cursor: pointer; transition: all 0.2s; }
.chip:hover { border-color: #00d4ff; color: #00d4ff; }
.chip.active { background: #0f3460; border-color: #00d4ff; color: #00d4ff; }
.chip-label { font-size: 0.65rem; color: #666; display: block; margin-top: 2px; }

/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: #16213e; border: 1px solid #0f3460; border-radius: 12px; padding: 24px; max-width: 700px; width: 90%; max-height: 80vh; overflow: auto; }
.modal h3 { color: #00d4ff; margin-bottom: 16px; }
.modal-close { float: right; background: #e74c3c; color: #fff; border: none; border-radius: 4px; padding: 4px 10px; cursor: pointer; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 0.82rem; }
.detail-grid .label { color: #888; }
.detail-grid .value { color: #eee; font-weight: 500; }

/* Filtros genéricos */
.filters-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; max-height: 300px; overflow-y: auto; padding: 4px; }
.filter-item { display: flex; flex-direction: column; }
.filter-item label { font-size: 0.7rem; color: #666; margin-bottom: 2px; font-family: monospace; }
.filter-item input { font-size: 0.8rem; padding: 5px 8px; }
.filter-item input:not(:placeholder-shown) { border-color: #00d4ff; background: #0a1020; }
