/* 站群管理系统 v3.13.1 - WordPress风格 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #f1f1f1;
    color: #32373c;
    min-height: 100vh;
}

/* 布局容器 */
.wp-container {
    display: flex;
    min-height: 100vh;
}

/* 左侧菜单栏 */
.wp-sidebar {
    width: 200px;
    background: #23282d;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
}

.wp-sidebar .logo {
    padding: 20px 15px;
    background: #191e23;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #191e23;
}

.wp-sidebar .version {
    color: #82878c;
    font-size: 12px;
    display: block;
    margin-top: 5px;
    font-weight: 400;
}

.wp-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wp-menu li {
    border-bottom: 1px solid #32373c;
}

.wp-menu a {
    display: block;
    padding: 12px 15px;
    color: #eee;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
}

.wp-menu a:hover,
.wp-menu a.active {
    background: #0073aa;
    color: #fff;
}

.wp-menu-icon {
    margin-right: 8px;
    width: 20px;
    display: inline-block;
}

/* 主内容区 */
.wp-main {
    margin-left: 200px;
    flex: 1;
    padding: 0;
    width: calc(100% - 200px);
}

/* 顶部工具栏 */
.wp-toolbar {
    background: #fff;
    border-bottom: 1px solid #ccd0d4;
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.wp-toolbar h1 {
    font-size: 23px;
    font-weight: 400;
    color: #23282d;
    margin: 0;
    line-height: 1.3;
}

/* 内容区域 */
.wp-content {
    padding: 20px;
}

/* 卡片容器 */
.wp-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    margin-bottom: 20px;
}

.wp-card-header {
    padding: 12px 20px;
    border-bottom: 1px solid #ccd0d4;
    background: #fafafa;
}

.wp-card-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #23282d;
    margin: 0;
}

.wp-card-body {
    padding: 20px;
}

/* 按钮 - WordPress风格 */
.btn {
    display: inline-block;
    padding: 8px 15px;
    font-size: 13px;
    line-height: 1.5;
    border: 1px solid #0073aa;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
    font-weight: 400;
}

.btn:hover {
    background: #005a87;
    border-color: #005a87;
}

.btn-primary {
    background: #0073aa;
    border-color: #0073aa;
}

.btn-secondary {
    background: #f0f0f1;
    border-color: #c3c4c7;
    color: #2c3338;
}

.btn-secondary:hover {
    background: #dcdcde;
    border-color: #999;
    color: #000;
}

.btn-danger {
    background: #d63638;
    border-color: #d63638;
}

.btn-danger:hover {
    background: #b52727;
    border-color: #b52727;
}

.btn-success {
    background: #00a32a;
    border-color: #00a32a;
}

.btn-success:hover {
    background: #008a20;
    border-color: #008a20;
}

.btn-warning {
    background: #f0b849;
    border-color: #f0b849;
    color: #2c3338;
}

.btn-warning:hover {
    background: #dba617;
    border-color: #dba617;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* 表格 - 优化列宽 */
.wp-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    table-layout: fixed;
}

.wp-table thead {
    background: #fafafa;
    border-bottom: 1px solid #ccd0d4;
}

.wp-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #2c3338;
}

.wp-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f0f0f1;
    font-size: 13px;
}

.wp-table tbody tr:hover {
    background: #f9f9f9;
}

/* 列宽优化 */
.wp-table .col-id { width: 50px; }
.wp-table .col-name { width: 150px; }
.wp-table .col-count { width: 80px; }
.wp-table .col-stats { width: 200px; }
.wp-table .col-actions { width: auto; }

/* 统计信息 */
.stats {
    color: #646970;
    font-size: 12px;
}

.stats-item {
    display: inline-block;
    margin-right: 15px;
}

.stats-label {
    color: #646970;
}

.stats-value {
    color: #0073aa;
    font-weight: 600;
    margin-left: 5px;
}

/* 操作按钮组 - 不换行 */
.action-group {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 0;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,.7);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #dcdcde;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #646970;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-btn:hover {
    color: #d63638;
}

.modal-body {
    padding: 20px;
    max-height: calc(80vh - 120px);
    overflow-y: auto;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #dcdcde;
    background: #f6f7f7;
    text-align: right;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #1d2327;
    font-weight: 600;
    font-size: 14px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 0;
    font-size: 13px;
    background: #fff;
    color: #2c3338;
    box-shadow: 0 0 0 transparent;
    transition: all 0.15s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: #0073aa;
    outline: 0;
    box-shadow: 0 0 0 1px #0073aa;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-hint {
    color: #646970;
    font-size: 12px;
    margin-top: 5px;
}

/* 单选框和复选框 */
.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
}

.radio-label input,
.checkbox-label input {
    margin-right: 6px;
}

/* 开关按钮 */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #0073aa;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* ThinkPHP风格弹窗提示 */
.tp-notice {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    background: #fff;
    border-left: 4px solid;
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
    padding: 15px 20px;
    z-index: 20000;
    display: none;
    animation: slideInRight 0.3s ease;
}

.tp-notice.show {
    display: block;
}

.tp-notice.success {
    border-left-color: #00a32a;
}

.tp-notice.error {
    border-left-color: #d63638;
}

.tp-notice.warning {
    border-left-color: #f0b849;
}

.tp-notice.info {
    border-left-color: #0073aa;
}

.tp-notice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tp-notice-title {
    font-weight: 600;
    font-size: 14px;
    color: #1d2327;
}

.tp-notice-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #646970;
    font-size: 18px;
    padding: 0;
}

.tp-notice-body {
    color: #2c3338;
    font-size: 13px;
    line-height: 1.6;
}

/* 日志查看器 */
.log-viewer {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
    max-height: 600px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.log-line {
    margin-bottom: 2px;
}

.log-line.error {
    color: #f48771;
}

.log-line.success {
    color: #b5cea8;
}

.log-line.warning {
    color: #dcdcaa;
}

/* 动画 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .wp-sidebar {
        width: 60px;
    }
    
    .wp-sidebar .logo span,
    .wp-sidebar .version {
        display: none;
    }
    
    .wp-menu a {
        padding: 12px;
        text-align: center;
    }
    
    .wp-menu-icon {
        margin: 0;
    }
    
    .wp-main {
        margin-left: 60px;
        width: calc(100% - 60px);
    }
}
