/* ===== GLOBAL ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: #0d0f14;
    color: #e2e8f0;
    min-height: 100vh;
}

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: sticky; top: 0; z-index: 100;
}
.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #7c3aed, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.nav-links { display: flex; gap: 0.5rem; }
.nav-links a {
    padding: 0.4rem 1rem;
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
    background: rgba(124,58,237,0.15);
    color: #a78bfa;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ===== CARD ===== */
.card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(8px);
    transition: border-color 0.2s;
}
.card:hover { border-color: rgba(124,58,237,0.3); }

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.card-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #f1f5f9;
    flex: 1;
}
.card-icon { font-size: 1.25rem; }
.card-body { padding: 1.5rem; }
.header-actions { margin-left: auto; }

/* ===== FORM ===== */
.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.form-control {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    color: #f1f5f9;
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.form-control:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}
.curl-input { min-height: 100px; resize: vertical; font-family: 'Consolas', monospace; font-size: 0.8rem; }
.hint { font-size: 0.78rem; color: #64748b; margin-top: 0.5rem; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.form-group { display: flex; flex-direction: column; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    border: none;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: white;
    box-shadow: 0 4px 15px rgba(124,58,237,0.3);
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124,58,237,0.45);
}
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-large { width: 100%; padding: 0.9rem; font-size: 1rem; border-radius: 10px; }
.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: #94a3b8;
}
.btn-outline:hover { border-color: #7c3aed; color: #a78bfa; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }

/* ===== LOADER ===== */
.loader {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}
.badge-success { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.badge-error { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }

.result-msg { color: #94a3b8; font-size: 0.9rem; margin-bottom: 1rem; }

.log-box {
    background: #0a0c10;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
}
.log-line { font-family: 'Consolas', monospace; font-size: 0.78rem; color: #22d3ee; padding: 0.15rem 0; }

/* ===== TABLE ===== */
.table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    color: #64748b;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: middle;
}
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.empty-row { text-align: center; color: #475569; padding: 2rem !important; }
.msg-cell { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #94a3b8; }

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.status-badge.success { background: rgba(16,185,129,0.15); color: #34d399; }
.status-badge.error { background: rgba(239,68,68,0.15); color: #f87171; }

/* ===== FILTER BAR ===== */
.filter-bar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* ===== STATS ===== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}
.stat-item.success { border-color: rgba(16,185,129,0.3); }
.stat-item.error { border-color: rgba(239,68,68,0.3); }
.stat-label { display: block; font-size: 0.75rem; color: #64748b; margin-bottom: 0.3rem; text-transform: uppercase; }
.stat-value { font-size: 1.4rem; font-weight: 700; color: #f1f5f9; }
.stat-item.success .stat-value { color: #34d399; }
.stat-item.error .stat-value { color: #f87171; }

/* ===== SELECT ===== */
select.form-control option { background: #1e2130; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
