/* MikPress 后台样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #48bb78;
    --danger: #f56565;
    --warning: #ed8936;
    --info: #4299e1;
    --dark: #2d3748;
    --gray: #718096;
    --light: #f7fafc;
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f0f2f5;
    color: var(--dark);
    line-height: 1.6;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.admin-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1a202c 0%, #2d3748 100%);
    color: #fff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: width 0.3s;
    z-index: 1000;
}

.sidebar-brand {
    padding: 20px;
    font-size: 20px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-brand i { color: var(--primary); }

.sidebar-nav { padding: 15px 0; }

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s;
    gap: 12px;
}

.nav-item:hover, .nav-item.active {
    background: rgba(102, 126, 234, 0.2);
    color: #fff;
    border-left: 3px solid var(--primary);
}

.nav-item i { width: 20px; text-align: center; }

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 10px 15px;
}

/* 主内容区 */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s;
}

.admin-header {
    background: #fff;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--dark);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-link {
    color: var(--gray);
    text-decoration: none;
    font-size: 14px;
}

.header-link:hover { color: var(--primary); }



.admin-content {
    padding: 25px;
}

/* 页面标题 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title { font-size: 16px; font-weight: 600; }

.card-body { padding: 25px; }

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
}

.stat-icon.blue { background: linear-gradient(135deg, #667eea, #764ba2); }
.stat-icon.green { background: linear-gradient(135deg, #48bb78, #38a169); }
.stat-icon.orange { background: linear-gradient(135deg, #ed8936, #dd6b20); }
.stat-icon.red { background: linear-gradient(135deg, #f56565, #e53e3e); }

.stat-info h3 { font-size: 28px; font-weight: 700; }
.stat-info p { color: var(--gray); font-size: 14px; }

/* 表格 */
.mp-table {
    width: 100%;
    border-collapse: collapse;
}

.mp-table th, .mp-table td {
    padding: 14px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.mp-table th {
    font-weight: 600;
    color: var(--gray);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mp-table tr:hover { background: #fafafa; }

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-secondary { background: #e2e8f0; color: var(--dark); }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 30px; font-size: 16px; }

/* 表单 */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* 警告 */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success { background: #f0fff4; color: #22543d; border-left: 4px solid var(--success); }
.alert-error { background: #fff5f5; color: #742a2a; border-left: 4px solid var(--danger); }
.alert-warning { background: #fffaf0; color: #7c2d12; border-left: 4px solid var(--warning); }
.alert-info { background: #ebf8ff; color: #2a4365; border-left: 4px solid var(--info); }

/* 标签 */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success { background: #c6f6d5; color: #22543d; }
.badge-warning { background: #feebc8; color: #7c2d12; }
.badge-danger { background: #fed7d7; color: #742a2a; }
.badge-info { background: #bee3f8; color: #2a4365; }

/* 操作链接 */
.action-links a {
    color: var(--primary);
    text-decoration: none;
    margin-right: 10px;
    font-size: 13px;
}

.action-links a:hover { text-decoration: underline; }
.action-links a.delete { color: var(--danger); }

/* 搜索框 */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

/* 主题卡片 */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.theme-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.3s;
}

.theme-card:hover { transform: translateY(-4px); }

.theme-screenshot {
    height: 200px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 48px;
}

.theme-screenshot img { width: 100%; height: 100%; object-fit: cover; }

.theme-info { padding: 20px; }
.theme-info h3 { margin-bottom: 5px; }
.theme-info p { color: var(--gray); font-size: 13px; margin-bottom: 15px; }

.theme-active {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--success);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* 插件列表 */
.plugin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.plugin-item:last-child { border-bottom: none; }

.plugin-info h4 { margin-bottom: 5px; }
.plugin-info p { color: var(--gray); font-size: 13px; }

/* 编辑器 */
.editor-wrapper {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.editor-toolbar {
    background: #f7fafc;
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 5px;
}

.editor-toolbar button {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.editor-toolbar button:hover { background: var(--light); }

.editor-content {
    min-height: 400px;
    padding: 15px;
    outline: none;
}

/* 登录页 */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark);
}

.login-logo {
    text-align: center;
    margin-bottom: 20px;
    font-size: 36px;
    color: var(--primary);
}

/* 分页 */
.pagination {
    display: flex;
    gap: 5px;
    margin-top: 20px;
    justify-content: center;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

.pagination a { background: #fff; color: var(--dark); border: 1px solid #e2e8f0; }
.pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; }

/* 响应式 */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .theme-grid { grid-template-columns: 1fr; }
}


/* 后台页脚 */
.admin-page-footer {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 13px;
    border-top: 1px solid #f0f0f0;
    margin-top: 20px;
}
.admin-page-footer a {
    color: #999;
    text-decoration: none;
}
.admin-page-footer a:hover {
    color: #667eea;
}

/* 下拉菜单 - 纯点击 */
.dropdown-wrap {
    position: relative;
    display: inline-block;
}
.dropdown-trigger {
    background: #edf2f7;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}
.dropdown-trigger:hover {
    background: #e2e8f0;
}
.dropdown-panel {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    min-width: 160px;
    overflow: hidden;
    z-index: 9999;
    border: 1px solid #e2e8f0;
}
.dropdown-panel a {
    display: block;
    padding: 12px 16px;
    color: #2d3748;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #f7fafc;
}
.dropdown-panel a:last-child {
    border-bottom: none;
}
.dropdown-panel a:hover {
    background: #f7fafc;
}
.dropdown-panel a i {
    width: 18px;
    text-align: center;
    margin-right: 8px;
    color: #667eea;
}

/* 用户菜单 - 纯点击 */















    to { opacity: 1; transform: translateY(0); }
}






