/* Personal Crawler Admin - Custom Styles */

/* 全局 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f3f4f6;
}

/* 导航栏激活状态 */
.nav-link.active {
    color: #3b82f6;
    border-bottom: 2px solid #3b82f6;
}

/* 表格行hover */
tbody tr:hover {
    background-color: #f9fafb;
}

/* 加载状态 */
.htmx-request .htmx-indicator {
    display: inline-block;
}

.htmx-indicator {
    display: none;
}

/* Toast 通知 */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    color: white;
    font-size: 0.875rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease-out;
}

.toast-success { background-color: #10b981; }
.toast-error   { background-color: #ef4444; }
.toast-info    { background-color: #3b82f6; }
.toast-warning { background-color: #f59e0b; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* 代码编辑器 */
.code-editor {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    tab-size: 4;
}

/* 状态徽章 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-running  { background-color: #d1fae5; color: #065f46; }
.badge-stopped  { background-color: #fee2e2; color: #991b1b; }
.badge-pending  { background-color: #fef3c7; color: #92400e; }
.badge-finished { background-color: #dbeafe; color: #1e40af; }

/* 模态框遮罩 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

/* 卡片阴影层级 */
.card-elevated {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}
