/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f3f4f6; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Animations */
.fade-in { animation: fadeIn 0.2s ease-in; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Loading spinner */
.spinner { border: 3px solid rgba(99,102,241,0.2); border-top-color: #6366f1; border-radius: 50%; width: 24px; height: 24px; animation: spin 0.6s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Status badges */
.badge { padding: 2px 8px; border-radius: 9999px; font-size: 0.75rem; font-weight: 500; }
.badge-pending { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }
.badge-searching { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.badge-mapping { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.badge-scraping { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.badge-done { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.badge-failed { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.badge-mx_valid { background: #fef3c7; color: #d97706; border: 1px solid #fcd34d; }
.badge-smtp_valid { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }

/* Recheck icon spinning animation */
.recheck-icon { transition: transform 0.2s ease; }
button.spinning .recheck-icon { animation: spin 0.8s linear infinite; }
button.spinning { opacity: 0.6; cursor: not-allowed; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Expandable rows */
.expand-row { cursor: pointer; }
.expand-row:hover { background: #f9fafb; }
.expand-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.expand-content.open { max-height: 2000px; }

/* Modal styles */
.modal-backdrop { position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.5); z-index: 40; }
.modal-container { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-content { background: white; border-radius: 0.75rem; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); max-width: 32rem; width: 100%; transform: scale(0.95); opacity: 0; animation: modalIn 0.2s ease-out forwards; }
@keyframes modalIn { to { transform: scale(1); opacity: 1; } }

/* Checkbox styles */
input[type="checkbox"] { cursor: pointer; }
input[type="checkbox"]:focus { ring-color: #6366f1; }

/* Log console */
.log-console {
    background: #1a1a2e;
    border-radius: 0.5rem;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.7rem;
    line-height: 1.4;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.log-console-header {
    background: #16213e;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #0f3460;
}
.log-console-header span { color: #e2e8f0; font-weight: 600; font-size: 0.75rem; }
.log-console-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0.75rem;
    max-height: 600px;
    min-height: 400px;
}
.log-line { white-space: pre-wrap; word-break: break-all; padding: 1px 0; }
.log-line .ts { color: #64748b; }
.log-line .level { font-weight: bold; }
.log-line .level-INFO { color: #38bdf8; }
.log-line .level-WARNING { color: #fbbf24; }
.log-line .level-ERROR { color: #f87171; }
.log-line .level-DEBUG { color: #94a3b8; }
.log-line .logger { color: #a78bfa; }
.log-line .msg { color: #e2e8f0; }
.log-line.msg-arrow .msg { color: #34d399; }
.log-line.msg-response .msg { color: #60a5fa; }
