/**
 * 用户日志页面样式表
 * 使用PageHeader重构后的专用样式
 */

/* 基础样式 */
.hilite { 
    background: #fda; 
}

td {
    white-space: nowrap;
    overflow: hidden;
}

body {
    margin: 0px;
}

/* 主表格单元格样式 */
.td_main {
    max-width: 380px;
    overflow: hidden;
}

/* 搜索表单样式 */
.search-form {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-form .form-inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.search-form .form-group {
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.search-form label {
    margin-bottom: 0;
    font-weight: bold;
    color: #495057;
}

.search-form .form-control {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
}

/* 表格容器 */
.table-container {
    margin: 20px 0;
    overflow-x: auto;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 日志表格样式 */
.log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 800px;
}

.log-table th {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.log-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.log-table tr:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

.log-table tr:nth-child(even) {
    background-color: #fafafa;
}

.log-table tr:nth-child(even):hover {
    background-color: #f0f0f0;
}

/* IP链接样式 */
.ip-link {
    color: #007bff;
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.ip-link:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* URL单元格样式 */
.url-cell {
    max-width: 380px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.url-cell a {
    color: #28a745;
    text-decoration: none;
    font-size: 13px;
}

.url-cell a:hover {
    text-decoration: underline;
    color: #1e7e34;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-form .form-inline {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-form .form-group {
        margin-bottom: 10px;
        justify-content: space-between;
    }
    
    .search-form .btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .log-table {
        font-size: 12px;
    }
    
    .log-table th,
    .log-table td {
        padding: 8px 10px;
    }
    
    .url-cell {
        max-width: 200px;
    }
}

@media (max-width: 576px) {
    .table-container {
        margin: 10px -15px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .url-cell {
        max-width: 150px;
    }
}

/* 分页样式增强 */
#div_Page {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

/* 警告框样式 */
.alert {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    border-left: 4px solid #17a2b8;
}

.alert h4 {
    margin-bottom: 10px;
    font-weight: 600;
}

/* 按钮样式增强 */
.btn {
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-outline-primary {
    border-color: #007bff;
    color: #007bff;
}

.btn-outline-primary:hover {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-outline-info {
    border-color: #17a2b8;
    color: #17a2b8;
}

.btn-outline-info:hover {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 表格排序指示器 */
.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 20px;
}

.sortable:after {
    content: "⇵";
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.6;
}

.sortable.asc:after {
    content: "↑";
    opacity: 1;
}

.sortable.desc:after {
    content: "↓";
    opacity: 1;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 10px;
    font-weight: 300;
}

/* 调试信息样式 */
.debug-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #6c757d;
}