/* =============================================================================
   📝 DATA INPUT INSURANCE — Manual Entry + URL Config + Scraper Health
   ============================================================================= */

.panel-data-input {
    background:
        radial-gradient(ellipse at top right, rgba(136, 216, 176, 0.07), transparent 60%),
        radial-gradient(ellipse at bottom left, rgba(155, 213, 255, 0.06), transparent 60%),
        linear-gradient(180deg, rgba(28, 20, 55, 0.94), rgba(10, 8, 24, 0.97));
    border: 1px solid rgba(136, 216, 176, 0.30);
    border-radius: 14px;
    padding: 22px 26px;
    margin-top: 18px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(136, 216, 176, 0.10);
}

/* ── Health badge ───────────────────────────────────────────────────────── */

.di-health-row {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 14px;
    background: rgba(10, 8, 24, 0.55);
    border: 1px solid rgba(212, 175, 55, 0.14);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
}
.di-health-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    border-radius: 999px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    border: 1px solid;
    transition: all 0.3s ease;
}
.di-health-chip.di-health-green {
    background: rgba(136, 216, 176, 0.16);
    color: #88d8b0;
    border-color: rgba(136, 216, 176, 0.50);
    box-shadow: 0 0 10px rgba(136, 216, 176, 0.30);
}
.di-health-chip.di-health-amber {
    background: rgba(255, 216, 107, 0.16);
    color: #ffd86b;
    border-color: rgba(255, 216, 107, 0.50);
    box-shadow: 0 0 10px rgba(255, 216, 107, 0.30);
}
.di-health-chip.di-health-red {
    background: rgba(255, 123, 157, 0.16);
    color: #ff7b9d;
    border-color: rgba(255, 123, 157, 0.55);
    box-shadow: 0 0 12px rgba(255, 123, 157, 0.40);
    animation: di-pulse-warning 2s ease-in-out infinite;
}
.di-health-chip.di-health-unknown {
    background: rgba(255, 255, 255, 0.04);
    color: #888aa0;
    border-color: rgba(255, 255, 255, 0.20);
}
@keyframes di-pulse-warning {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 123, 157, 0.30); }
    50%      { box-shadow: 0 0 18px rgba(255, 123, 157, 0.70); }
}

.di-health-detail {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
    color: #ddc88a;
}
.di-health-detail-secondary {
    color: #888aa0;
    font-style: italic;
    font-size: 11px;
    margin-top: 3px;
}

/* ── Manual entry form ──────────────────────────────────────────────────── */

.di-card {
    background: rgba(10, 8, 24, 0.55);
    border: 1px solid rgba(212, 175, 55, 0.14);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.di-card-title {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
    color: #ddc88a;
    letter-spacing: 0.6px;
    margin-bottom: 12px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.di-card-hint {
    color: #888aa0;
    font-style: italic;
    font-size: 11px;
    font-weight: normal;
    letter-spacing: 0;
}

.di-form-row {
    display: grid;
    grid-template-columns: 140px 130px 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.di-form-label {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 11px;
    color: #b095f5;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: block;
}

.di-input {
    background: rgba(10, 8, 24, 0.60);
    border: 1px solid rgba(176, 149, 245, 0.30);
    border-radius: 6px;
    color: #ddc88a;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
    padding: 6px 10px;
    width: 100%;
    box-sizing: border-box;
}
.di-input:focus { outline: 1px solid #d699ff; }

.di-ball-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
}
.di-ball-input {
    background: rgba(176, 149, 245, 0.10);
    border: 1px solid rgba(176, 149, 245, 0.40);
    border-radius: 6px;
    color: #d699ff;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 4px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}
.di-ball-input:focus {
    outline: 1px solid #ffd86b;
    background: rgba(255, 216, 107, 0.10);
}
.di-ball-input.di-ball-supp {
    background: rgba(155, 213, 255, 0.10);
    border-color: rgba(155, 213, 255, 0.40);
    color: #9bd5ff;
}

.di-form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.di-btn {
    background: rgba(136, 216, 176, 0.10);
    color: #88d8b0;
    border: 1px solid rgba(136, 216, 176, 0.30);
    border-radius: 999px;
    padding: 6px 14px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}
.di-btn:hover:not(:disabled) {
    background: rgba(136, 216, 176, 0.22);
    transform: translateY(-1px);
}
.di-btn:disabled { opacity: 0.55; cursor: progress; }

.di-btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: #888aa0;
    border-color: rgba(255, 255, 255, 0.15);
}
.di-btn-ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.10);
    color: #ddc88a;
}

.di-btn-danger {
    background: rgba(255, 123, 157, 0.08);
    color: #ff7b9d;
    border-color: rgba(255, 123, 157, 0.30);
}
.di-btn-danger:hover:not(:disabled) { background: rgba(255, 123, 157, 0.18); }

.di-result {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 11.5px;
    color: #ddc88a;
    margin-left: 6px;
    flex: 1;
}
.di-result.di-result-error { color: #ff7b9d; }
.di-result.di-result-ok { color: #88d8b0; }

/* ── URL config table ───────────────────────────────────────────────────── */

.di-sources-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.di-source-item {
    display: grid;
    grid-template-columns: 160px 1fr 90px 70px;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: linear-gradient(90deg, rgba(155, 213, 255, 0.04), transparent 80%);
    border-left: 2px solid rgba(155, 213, 255, 0.40);
    border-radius: 0 6px 6px 0;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
}
.di-source-item.di-source-disabled {
    opacity: 0.6;
    border-left-color: rgba(255, 255, 255, 0.20);
}

.di-source-name {
    color: #9bd5ff;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.di-source-url {
    color: #ddc88a;
    font-family: "Cascadia Mono", "Courier New", monospace;
    font-size: 10.5px;
    word-break: break-all;
}

.di-source-kind {
    color: #888aa0;
    font-style: italic;
    font-size: 10.5px;
    text-align: center;
}

.di-source-actions {
    display: inline-flex;
    gap: 4px;
    justify-content: flex-end;
}
.di-source-btn {
    background: rgba(176, 149, 245, 0.10);
    color: #b095f5;
    border: 1px solid rgba(176, 149, 245, 0.30);
    border-radius: 4px;
    padding: 2px 8px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 10.5px;
    cursor: pointer;
    transition: background 0.15s;
}
.di-source-btn:hover { background: rgba(176, 149, 245, 0.22); }
.di-source-btn.di-source-btn-del {
    color: #ff7b9d;
    border-color: rgba(255, 123, 157, 0.30);
}
.di-source-btn.di-source-btn-del:hover { background: rgba(255, 123, 157, 0.18); }

.di-add-source-form {
    display: grid;
    grid-template-columns: 160px 1fr auto;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px dashed rgba(212, 175, 55, 0.14);
}

/* ── Interpretation + foot ─────────────────────────────────────────────── */

.di-interp {
    background: linear-gradient(90deg, rgba(136, 216, 176, 0.07), transparent 80%);
    border-left: 2px solid rgba(136, 216, 176, 0.50);
    border-radius: 0 6px 6px 0;
    padding: 10px 16px;
    font-family: "Times New Roman", Georgia, serif;
    font-style: italic;
    font-size: 13px;
    color: #ddc88a;
    line-height: 1.5;
    margin-bottom: 12px;
}

@media (max-width: 900px) {
    .di-form-row { grid-template-columns: 1fr; }
    .di-source-item { grid-template-columns: 1fr; gap: 4px; }
    .di-add-source-form { grid-template-columns: 1fr; }
    .di-ball-grid { grid-template-columns: repeat(4, 1fr); }
}
