body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f4f7f6; margin: 0; padding: 20px; color: #2d3748; padding-bottom: 80px; }
.topbar { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 15px 25px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); margin-bottom: 20px; }
.topbar-left { display: flex; align-items: center; gap: 15px; }
.topbar-left h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.topbar-center { display: flex; gap: 10px; }
.topbar-right { display: flex; align-items: center; gap: 15px; }
.btn { padding: 8px 16px; border: none; border-radius: 6px; font-weight: 600; font-size: 14px; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 6px;}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-green { background: #e6fffa; color: #38a169; border: 1px solid #b2f5ea; }
.btn-green:hover:not(:disabled) { background: #38a169; color: white; }
.btn-red { background: #fff5f5; color: #e53e3e; border: 1px solid #fed7d7; }
.btn-red:hover:not(:disabled) { background: #e53e3e; color: white; }
.btn-orange { background: #fffaf0; color: #dd6b20; border: 1px solid #feebc8; }
.btn-orange:hover { background: #dd6b20; color: white; }
.btn-dark { background: #edf2f7; color: #2d3748; }
.btn-dark:hover { background: #cbd5e0; }
.status-badge { padding: 6px 12px; border-radius: 20px; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.status-badge.running { background: #c6f6d5; color: #22543d; }
.status-badge.idle { background: #edf2f7; color: #4a5568; }
.status-badge.stopping { background: #feebc8; color: #7b341e; }
.filter-select { padding: 8px 12px; border-radius: 6px; border: 1px solid #e2e8f0; font-size: 14px; color: #2d3748; font-weight: 500; outline: none; cursor: pointer; }

/* Блок текущего процесса */
.current-process { display: none; align-items: center; gap: 15px; background: #ebf8ff; border: 1px solid #90cdf4; padding: 15px 25px; border-radius: 12px; margin-bottom: 15px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.current-process.active { display: flex; }
.pulse-dot { width: 12px; height: 12px; background: #3182ce; border-radius: 50%; animation: pulse 1.5s infinite; }
.current-label { color: #2b6cb0; font-weight: 600; font-size: 18px; }
.current-phone { font-size: 24px; font-weight: 800; color: #1a365d; letter-spacing: 1px; font-family: monospace;}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(49, 130, 206, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(49, 130, 206, 0); } 100% { box-shadow: 0 0 0 0 rgba(49, 130, 206, 0); } }

/* Live Карточка */
.live-card { display: none; background: #fff; border: 2px solid #3182ce; border-radius: 12px; padding: 20px 25px; margin-bottom: 25px; box-shadow: 0 4px 15px rgba(49, 130, 206, 0.15); }
.live-header { font-weight: 800; color: #2b6cb0; margin-bottom: 15px; text-transform: uppercase; font-size: 16px; letter-spacing: 1px; display: flex; align-items: center; gap: 10px; }
.live-body div { margin-bottom: 8px; font-size: 18px; display: flex; }
.live-body .label { font-weight: 700; color: #4a5568; width: 100px; flex-shrink: 0; }

/* Сетка карточек */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-top: 4px solid #cbd5e0; display: flex; flex-direction: column; }
.card.offer_found { border-top-color: #38a169; }
.card.credit_frozen { border-top-color: #3182ce; }
.card.error { border-top-color: #e53e3e; }
.card.no_offer { border-top-color: #dd6b20; }
.card.no_ssn { border-top-color: #718096; }
.card.not_found { border-top-color: #636e72; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.phone { font-weight: 700; font-size: 18px; color: #2d3748; }
.badge { padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: #fff; }
.badge.offer_found { background: #38a169; }
.badge.credit_frozen { background: #3182ce; }
.badge.error { background: #e53e3e; }
.badge.no_offer { background: #dd6b20; }
.badge.no_ssn { background: #718096; }
.badge.not_found { background: #636e72; }
.info-row { margin-bottom: 8px; font-size: 14px; line-height: 1.5; display: flex; }
.info-row span.label { color: #718096; font-weight: 500; width: 75px; flex-shrink: 0; }
.info-row span.value { color: #2d3748; font-weight: 500; word-break: break-word; }
.error-box { margin-top: 10px; padding: 10px; background: #fff5f5; border: 1px solid #fed7d7; border-radius: 6px; color: #e53e3e; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.mark-buttons { display: flex; gap: 10px; margin-top: auto; padding-top: 20px; }
.btn-mark { flex: 1; padding: 10px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px; transition: all 0.2s; background: #f7fafc; color: #718096; }
.btn-mark:hover { background: #edf2f7; }
.btn-mark.approved { background: #4caf50 !important; color: #fff !important; border-color: #4caf50 !important; }
.btn-mark.decline { background: #f44336 !important; color: #fff !important; border-color: #f44336 !important; }

/* Логи */
.log-panel { position: fixed; bottom: 0; left: 0; right: 0; height: 300px; background: #1a202c; color: #a0aec0; transform: translateY(100%); transition: transform 0.3s ease-in-out; z-index: 1000; display: flex; flex-direction: column; box-shadow: 0 -4px 20px rgba(0,0,0,0.2); border-top: 1px solid #2d3748; }
.log-panel.open { transform: translateY(0); }
.log-header { display: flex; justify-content: space-between; padding: 10px 20px; background: #2d3748; color: #e2e8f0; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;}
.close-log { background: none; border: none; color: #a0aec0; cursor: pointer; font-size: 16px; }
.close-log:hover { color: #fff; }
#log-output { flex: 1; margin: 0; padding: 15px 20px; overflow-y: auto; font-family: monospace; font-size: 13px; line-height: 1.5; white-space: pre-wrap; }

/* ── workers list ── */
.workers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
}
.worker-row {
    background: #1a202c;
    border: 1px solid #2d3748;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
}
.worker-head {
    display: flex;
    gap: 12px;
    align-items: center;
    font-family: monospace;
}
.worker-head .w-id { color: #718096; }
.worker-head .w-phone { color: #e2e8f0; font-weight: 600; }
.worker-head .w-stage { font-weight: 600; }
.worker-head .w-secs { color: #a0aec0; margin-left: auto; }
.worker-data {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    font-size: 11px;
    color: #a0aec0;
}
