/* ── Variables ── */
:root {
    --brand-primary: #1a3a5c;
    --brand-accent:  #0d6efd;
    --brand-danger:  #dc3545;
    --brand-success: #198754;
    --brand-warning: #ffc107;
}

/* ── Global ── */
body {
    background: #f0f4f8;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
}

/* ── Header ── */
.app-header {
    background: #f1f3f5;
    border-bottom: 2px solid #dee2e6;
    padding: .85rem 0;
}
.app-header .logo-icon { height: 3.6rem; width: auto; }
.header-brand { text-decoration: none; }
.header-brand:hover { opacity: .8; }
.app-header h1 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.3px; color: var(--brand-primary); }
.app-header .subtitle { color: #6c757d; font-size: .8rem; }

/* ── Back link ── */
.nav-link-back { color: var(--brand-primary); text-decoration: none; font-size: .875rem; opacity: .75; }
.nav-link-back:hover { opacity: 1; }

/* ── Doc sections ── */
.doc-section {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.doc-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-primary);
    border-bottom: 2px solid #e9ecef;
    padding-bottom: .6rem;
    margin-bottom: 1.2rem;
}

/* ── Footer ── */
footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    text-align: center;
    color: #6c757d;
    font-size: .85rem;
    border-top: 1px solid #dee2e6;
}
footer a { color: #6c757d; }

/* ── Search Card ── */
.search-card { border: none; border-radius: 1rem; box-shadow: 0 4px 24px rgba(0,0,0,.10); overflow: hidden; }
.search-card .card-body { padding: 2rem; }
#targetInput {
    font-size: 1.05rem; border-radius: .6rem 0 0 .6rem;
    border: 2px solid #dee2e6; padding: .75rem 1rem; transition: border-color .2s;
}
#targetInput:focus { border-color: var(--brand-accent); box-shadow: 0 0 0 0.2rem rgba(13,110,253,.15); }
#btnCheck { border-radius: 0 .6rem .6rem 0; font-weight: 600; font-size: 1.05rem; padding: .75rem 1.5rem; white-space: nowrap; }

/* ── Options ── */
.options-row label { font-size: .85rem; color: #6c757d; }

/* ── Progress ── */
#progressSection { display: none; }
.progress-pulse { animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

/* ── Summary Cards ── */
.summary-card { border-radius: .8rem; border: none; padding: 1.2rem 1.5rem; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.summary-card .count { font-size: 2rem; font-weight: 700; line-height: 1; }
.summary-card .label { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; opacity: .8; margin-top: .3rem; }
.summary-ok      { background: #d1e7dd; color: #0f5132; }
.summary-listed  { background: #f8d7da; color: #721c24; }
.summary-timeout { background: #fff3cd; color: #664d03; }
.summary-total   { background: #cfe2ff; color: #084298; }

/* ── Section Header ── */
.section-header {
    background: var(--brand-primary); color: #fff; border-radius: .6rem .6rem 0 0;
    padding: .8rem 1.2rem; display: flex; align-items: center; gap: .6rem; font-weight: 600; font-size: .95rem;
}

/* ── Results Table ── */
.results-table { font-size: .875rem; margin: 0; }
.results-table thead th { background: #f8f9fa; font-weight: 600; border-bottom: 2px solid #dee2e6; white-space: nowrap; padding: .6rem .8rem; }
.results-table tbody tr { transition: background .15s; }
.results-table tbody tr:hover { background: #f8f9fa; }
.results-table td { vertical-align: middle; padding: .5rem .8rem; }

/* ── Status Badges ── */
.badge-ok      { background: #d1e7dd; color: #0f5132; }
.badge-listed  { background: #f8d7da; color: #721c24; }
.badge-timeout { background: #fff3cd; color: #664d03; }
.badge-error   { background: #e2e3e5; color: #41464b; }
.status-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 20px; font-size: .78rem; font-weight: 600; }

/* ── Severity Pips ── */
.severity-pip { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #dee2e6; }
.severity-pip.active { background: #ffc107; }

/* ── Filter bar ── */
.filter-bar { background: #fff; border: 1px solid #dee2e6; border-top: none; padding: .5rem .8rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.filter-btn { font-size: .78rem; padding: .2rem .7rem; border-radius: 20px; }
.filter-btn.active { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }

/* ── MX badge ── */
.mx-priority-badge { background: #e0e7ff; color: #3730a3; font-size: .7rem; padding: .15rem .5rem; border-radius: 20px; font-weight: 600; }

/* ── Delist link ── */
.delist-link { font-size: .78rem; }

/* ── Misc ── */
#errorSection { display: none; }
.empty-state { text-align: center; padding: 3rem; color: #6c757d; }
.empty-state i { font-size: 3rem; }
.tooltip-inner { font-size: .75rem; }

/* ── API doc ── */
.endpoint-box { background: #0f2740; border-radius: .6rem; padding: 1rem 1.2rem; display: flex; align-items: center; gap: .8rem; font-family: monospace; font-size: 1rem; color: #e2e8f0; }
.method-badge { background: #0d6efd; color: #fff; font-weight: 700; font-size: .85rem; padding: .25rem .7rem; border-radius: .4rem; white-space: nowrap; }
.param-name { font-family: monospace; font-size: .9rem; font-weight: 600; color: #0d6efd; }
.param-required { font-size: .72rem; background: #f8d7da; color: #721c24; padding: .1rem .4rem; border-radius: 20px; font-weight: 600; }
.param-optional { font-size: .72rem; background: #d1e7dd; color: #0f5132; padding: .1rem .4rem; border-radius: 20px; font-weight: 600; }
pre { border-radius: .6rem; font-size: .82rem; margin: 0; }
.code-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #6c757d; margin-bottom: .4rem; }
.field-name { font-family: monospace; font-size: .88rem; color: #198754; font-weight: 600; }
.field-type { font-size: .75rem; background: #e9ecef; color: #495057; padding: .1rem .4rem; border-radius: 20px; }
.http-code { font-family: monospace; font-weight: 700; font-size: .95rem; }
.http-200 { color: #198754; } .http-400 { color: #fd7e14; } .http-405 { color: #6c757d; }
.http-500 { color: #dc3545; } .http-504 { color: #dc3545; }
.nav-tabs .nav-link { font-size: .85rem; }

/* ── Responsive ── */
@media (max-width: 576px) {
    .app-header h1 { font-size: 1.4rem; }
    #targetInput, #btnCheck { font-size: .95rem; }
    .summary-card .count { font-size: 1.5rem; }
}
