/* CloudFlare Batch Manager - Custom Styles */

/* 主题颜色 */
:root {
    --cf-orange: #f38020;
    --cf-blue: #1a1a2e;
    --cf-cyan: #00d4aa;
    --bg-light: #f5f7fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa !important;
    color: #1a1a2e !important;
    min-height: 100vh;
}

/* 全局文字颜色修复 - 确保所有文字在浅色背景上清晰可见 */
body, .container, .container-fluid {
    color: #1a1a2e;
}

/* 卡片内文字 */
.card, .card-body, .card-header, .card-footer {
    color: #1a1a2e;
}

.card-header {
    color: white !important;
}

/* 快速操作卡片 */
.quick-action-card, 
.quick-action-card h6, 
.quick-action-card small, 
.quick-action-card p {
    color: #1a1a2e !important;
}

/* 统计卡片 */
.stat-card, .stat-card h3, .stat-card h6 {
    color: #1a1a2e;
}

/* 表格文字 */
.table, .table td, .table th {
    color: #1a1a2e;
}

.table thead th {
    color: white !important;
}

/* 确保链接可见 */
a:not(.btn):not(.dropdown-item):not(.navbar-brand) {
    color: #f38020;
}

a:not(.btn):not(.dropdown-item):not(.navbar-brand):hover {
    color: #ff9500;
}

/* 表单标签和文字 */
label, .form-label, .form-text {
    color: #1a1a2e;
}

/* 列表组 */
.list-group-item {
    color: #1a1a2e;
    background-color: white;
}

/* 空状态文字 */
.empty-state, .empty-state h5, .empty-state p {
    color: #666666;
}

.empty-state h5 {
    color: #1a1a2e !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    min-height: 100vh;
}

/* 导航栏 */
.navbar-brand {
    font-weight: 600;
    color: var(--cf-orange) !important;
}

.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-link {
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--cf-orange) !important;
}

/* 主内容区域 */
.main-content {
    padding-top: 80px;
    min-height: calc(100vh - 200px);
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.card-header {
    background: linear-gradient(135deg, var(--cf-blue), #2a2a4e);
    color: white;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

.card-body {
    padding: 25px;
}

/* 按钮样式 */
.btn-cf {
    background: linear-gradient(135deg, var(--cf-orange), #ff9500);
    border: none;
    color: white;
    font-weight: 600;
    padding: 10px 25px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-cf:hover {
    background: linear-gradient(135deg, #ff9500, var(--cf-orange));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243,128,32,0.4);
}

.btn-outline-cf {
    border: 2px solid var(--cf-orange);
    color: var(--cf-orange);
    background: transparent;
    padding: 8px 25px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-outline-cf:hover {
    background: var(--cf-orange);
    color: white;
}

/* 快速操作卡片 */
.quick-action-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.quick-action-card:hover {
    background: white;
    border-color: var(--cf-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.quick-action-card h6 {
    color: var(--text-primary);
    font-weight: 600;
}

.quick-action-card small {
    color: var(--text-secondary);
}

/* 表单样式 */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 12px 15px;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.form-control:focus, .form-select:focus {
    border-color: var(--cf-orange);
    box-shadow: 0 0 0 3px rgba(243,128,32,0.2);
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* 徽章样式 */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.badge-active {
    background: var(--cf-cyan);
}

.badge-inactive {
    background: #6c757d;
}

.badge-proxied {
    background: var(--cf-orange);
}

/* 表格样式 */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: var(--cf-blue);
    color: white;
    border: none;
    font-weight: 600;
    padding: 15px;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(243,128,32,0.05);
}

.table td {
    vertical-align: middle;
    padding: 15px;
}

/* 登录页面 */
.login-bg {
    background: linear-gradient(135deg, var(--cf-blue), #16213e);
    min-height: 100vh;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* 功能卡片 */
.feature-card {
    text-align: center;
    padding: 30px 20px;
}

.feature-card i {
    font-size: 48px;
    color: var(--cf-orange);
    margin-bottom: 20px;
}

.feature-card h5 {
    color: var(--cf-blue);
    margin-bottom: 15px;
}

.feature-card p {
    color: #666;
    font-size: 14px;
}

/* 状态指示器 */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-active {
    background: #28a745;
    box-shadow: 0 0 8px rgba(40,167,69,0.5);
}

.status-inactive {
    background: #dc3545;
}

/* 分页样式 */
.pagination {
    margin-top: 20px;
}

.page-link {
    color: var(--cf-blue);
    border-radius: 20px;
    margin: 0 3px;
    border: none;
}

.page-item.active .page-link {
    background: var(--cf-orange);
    border-color: var(--cf-orange);
}

.page-link:hover {
    background: rgba(243,128,32,0.1);
    color: var(--cf-orange);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast 提示 */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
}

/* 进度条 */
.progress {
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--cf-orange), var(--cf-cyan));
}

/* 响应式调整 */
@media (max-width: 768px) {
    .main-content {
        padding-top: 70px;
    }

    .card-body {
        padding: 15px;
    }

    .feature-card i {
        font-size: 36px;
    }
}

/* 下拉菜单 */
.dropdown-menu {
    border: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-radius: 10px;
    padding: 10px;
}

.dropdown-item {
    border-radius: 6px;
    padding: 10px 15px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(243,128,32,0.1);
    color: var(--cf-orange);
}

/* 标签页 */
.nav-tabs {
    border-bottom: 2px solid #e0e0e0;
}

.nav-tabs .nav-link {
    border: none;
    color: #666;
    font-weight: 500;
    padding: 12px 20px;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.nav-tabs .nav-link.active {
    color: var(--cf-orange);
    border-bottom-color: var(--cf-orange);
    background: transparent;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
    color: var(--text-muted);
}

.empty-state h5 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-secondary);
}

/* 确保所有卡片内文字清晰 */
.card {
    color: var(--text-primary);
}

.card-title {
    color: var(--text-primary);
}

.card-text {
    color: var(--text-secondary);
}

/* 表格文字颜色 */
.table {
    color: var(--text-primary);
}

.table thead th {
    color: white;
}

.table tbody td {
    color: var(--text-primary);
}

/* 统计卡片图标 */
.stat-icon {
    opacity: 0.7 !important;
}

/* 快速操作区域优化 */
.bg-light {
    background-color: #f8f9fa !important;
}

.bg-light h6,
.bg-light p,
.bg-light small,
.bg-light a {
    color: var(--text-primary) !important;
}

/* 确保链接颜色正确 */
a {
    color: var(--cf-orange);
}

a:hover {
    color: #ff9500;
}

/* 面包屑和辅助文字 */
.text-muted {
    color: var(--text-secondary) !important;
}

/* 徽章文字 */
.badge {
    color: white;
}

.badge.bg-light {
    color: var(--text-primary) !important;
}

/* 操作按钮组 */
.action-buttons .btn {
    margin: 2px;
}

/* 模态框优化 */
.modal-header {
    background: linear-gradient(135deg, var(--cf-blue), #2a2a4e);
    color: white;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* 输入组 */
.input-group-text {
    background: var(--cf-blue);
    color: white;
    border: none;
    border-radius: 8px 0 0 8px;
}

/* 表格选择框 */
.table-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* 工具提示 */
.tooltip-inner {
    background: var(--cf-blue);
    border-radius: 6px;
    padding: 8px 12px;
}

/* 切换开关 */
.form-switch .form-check-input {
    width: 50px;
    height: 26px;
    cursor: pointer;
}

.form-switch .form-check-input:checked {
    background-color: var(--cf-orange);
    border-color: var(--cf-orange);
}

/* 错误提示 */
.invalid-feedback {
    color: #dc3545;
    font-size: 13px;
}

.is-invalid {
    border-color: #dc3545 !important;
}
