/* 管理员白名单管理系统自定义样式 */

/* IP地址验证状态样式 */
.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* IP统计信息样式 */
#ip-stats {
    font-family: monospace;
    font-size: 12px;
    color: #666;
}

#ip-count-display {
    font-weight: bold;
    color: #007bff;
}

/* 管理员白名单表格样式 */
#admin-whitelist-table .btn-group {
    white-space: nowrap;
}

#admin-whitelist-table .btn-sm {
    margin-right: 5px;
}

/* 管理员白名单统计卡片样式 */
.admin-stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.admin-stats-card .no-margins {
    font-size: 3rem;
    font-weight: bold;
    margin: 10px 0;
}

.admin-stats-card .stat-percent {
    font-size: 1.5rem;
    margin: 10px 0;
}

.admin-stats-card small {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 表格优化 */
#admin-whitelist-table {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

#admin-whitelist-table thead {
    background-color: #f8f9fa;
}

#admin-whitelist-table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

#admin-whitelist-table tbody tr:hover {
    background-color: #f8f9fa;
    transition: background-color 0.3s ease;
}

/* 模态框样式优化 */
.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px 8px 0 0;
}

.modal-header .close {
    color: white;
    opacity: 0.8;
    text-shadow: none;
}

.modal-header .close:hover {
    opacity: 1;
}

.modal-content {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* 管理员IP输入框样式 */
#admin_ips {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    resize: vertical;
    min-height: 150px;
}

/* 工具提示样式 */
.help-block {
    font-size: 12px;
    color: #777;
    margin-top: 5px;
    background-color: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    border-left: 4px solid #007bff;
}

/* 按钮样式优化 */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .modal-lg {
        width: 95%;
        margin: 10px auto;
    }
    
    #admin-whitelist-table .btn-sm {
        display: block;
        margin: 2px 0;
        width: 100%;
    }
    
    .admin-stats-card .no-margins {
        font-size: 2rem;
    }
}

/* 加载状态样式 */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 页面标题样式 */
.navbar-brand {
    font-weight: bold;
    color: #495057 !important;
}

/* 侧边栏优化 */
.nav-header {
    text-align: center;
    padding: 20px 0;
}

.nav-header .text-muted {
    font-size: 0.9rem;
    font-weight: 500;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* 自定义滚动条 */
#admin_ips::-webkit-scrollbar {
    width: 8px;
}

#admin_ips::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#admin_ips::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

#admin_ips::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 状态指示器 */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-indicator.success {
    background-color: #28a745;
}

.status-indicator.error {
    background-color: #dc3545;
}

.status-indicator.warning {
    background-color: #ffc107;
}

/* ============== 批量操作样式 ============== */

/* 批量操作按钮组 */
.ibox-tools .btn-group {
    margin-left: 10px;
}

.ibox-tools .btn-group .btn {
    margin-left: 5px;
    transition: all 0.3s ease;
}

.ibox-tools .btn-group .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 批量操作模态框 */
.batch-modal .modal-content {
    border: none;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.batch-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px 8px 0 0;
}

.batch-modal .alert {
    margin: 0 0 20px 0;
    border-radius: 6px;
}

.batch-modal .alert-info {
    background-color: #e7f3ff;
    border-color: #b8daff;
    color: #0c5460;
}

.batch-modal .alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

/* 批量操作文本域样式 */
#batch_add_ips, #batch_remove_ips {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    resize: vertical;
    min-height: 150px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    transition: border-color 0.3s ease;
}

#batch_add_ips:focus, #batch_remove_ips:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* 批量操作统计样式 */
#batch-add-ip-stats, #batch-remove-ip-stats {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: bold;
    color: #495057;
    background-color: #f8f9fa;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 5px;
}

/* 批量操作结果样式 */
.batch-result {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
}

.batch-result h4 {
    color: #495057;
    margin-bottom: 15px;
    font-weight: 600;
}

.batch-result .alert {
    margin-bottom: 15px;
    border-radius: 6px;
}

.batch-result .alert h5 {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.batch-result .alert ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.batch-result .alert li {
    margin-bottom: 5px;
    font-size: 14px;
}

.batch-result .alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.batch-result .alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* 批量操作按钮样式 */
.btn-batch-add {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-batch-add:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-batch-remove {
    background: linear-gradient(135deg, #fd7e14 0%, #e83e8c 100%);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-batch-remove:hover {
    background: linear-gradient(135deg, #e83e8c 0%, #fd7e14 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(253, 126, 20, 0.3);
}

.btn-batch-clear {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-batch-clear:hover {
    background: linear-gradient(135deg, #e74c3c 0%, #dc3545 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

/* 处理中状态 */
.btn-processing {
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-processing .fa-spin {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .ibox-tools .btn-group {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .ibox-tools .btn-group .btn {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
    
    .batch-result {
        max-height: 250px;
        padding: 10px;
    }
    
    .batch-result .alert li {
        font-size: 12px;
    }
} 