/* 自定义后台样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    background-color: #f4f6f9;
}

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

.login-card {
    width: 420px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.login-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
    padding: 2rem 1rem;
    border: none;
}

.login-card .card-header h3 {
    margin: 0;
    font-weight: 600;
}

.login-card .card-body {
    padding: 2rem;
}

/* 后台布局 */
.admin-layout {
    min-height: 100vh;
}

.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 240px;
    background: #1f2937;
    color: #fff;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s;
}

.admin-sidebar.collapsed {
    width: 60px;
}

.admin-sidebar .sidebar-header {
    padding: 15px;
    background: #111827;
    display: flex;
    align-items: center;
    height: 60px;
}

.admin-sidebar .sidebar-header .logo {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
}

.admin-sidebar .sidebar-menu {
    padding: 10px 0;
}

.admin-sidebar .menu-item {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    color: #d1d5db;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.admin-sidebar .menu-item:hover,
.admin-sidebar .menu-item.active {
    background: #374151;
    color: #fff;
    border-left-color: #667eea;
}

.admin-sidebar .menu-item .menu-icon {
    width: 20px;
    margin-right: 12px;
    text-align: center;
    flex-shrink: 0;
}

.admin-sidebar .menu-item .menu-text {
    white-space: nowrap;
    overflow: hidden;
    flex: 1;
}

.admin-sidebar .menu-arrow {
    transition: transform 0.2s;
}
.admin-sidebar .menu-arrow.rotate {
    transform: rotate(180deg);
}

.admin-sidebar .submenu {
    display: none;
    background: #111827;
}

.admin-sidebar .submenu.open {
    display: block;
}

.admin-sidebar .submenu .menu-item {
    padding-left: 55px;
    font-size: 14px;
}

.admin-main {
    margin-left: 240px;
    transition: all 0.3s;
    min-height: 100vh;
}

.admin-main.full {
    margin-left: 60px;
}

.admin-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 999;
}

.admin-header .toggle-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6b7280;
    margin-right: 20px;
}

.admin-header .header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-content {
    padding: 20px;
}

/* 卡片样式 */
.content-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.content-card .card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 表格 */
.admin-table {
    width: 100%;
}

.admin-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.admin-table td,
.admin-table th {
    padding: 12px;
    vertical-align: middle;
}

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

.status-badge.success {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.info {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.secondary {
    background: #e5e7eb;
    color: #374151;
}

/* 操作按钮 */
.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

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

/* 搜索表单 */
.search-form {
    background: #f9fafb;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.search-form .form-group {
    margin-bottom: 0;
}

/* 分页 */
.pagination-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.pagination-info {
    color: #6b7280;
    font-size: 14px;
}

/* 统计卡片 */
.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

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

.stat-card .stat-icon.blue { background: linear-gradient(135deg, #667eea, #764ba2); }
.stat-card .stat-icon.green { background: linear-gradient(135deg, #11998e, #38ef7d); }
.stat-card .stat-icon.orange { background: linear-gradient(135deg, #f093fb, #f5576c); }
.stat-card .stat-icon.purple { background: linear-gradient(135deg, #4facfe, #00f2fe); }

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-top: 10px;
}

.stat-card .stat-label {
    color: #6b7280;
    font-size: 14px;
    margin-top: 5px;
}

/* 跳转页面 */
.jump-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f6f9;
}

.jump-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    text-align: center;
    max-width: 450px;
    width: 90%;
}

.jump-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
    color: #fff;
}

.jump-icon.success { background: #10b981; }
.jump-icon.error { background: #ef4444; }

/* 树形菜单权限 */
.tree-checkbox {
    padding: 8px 0;
}

.tree-checkbox ul {
    list-style: none;
    padding-left: 25px;
    margin: 5px 0;
}

.tree-checkbox li {
    margin: 5px 0;
}

.tree-checkbox label {
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0;
}

/* 上传区域 */
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f5f3ff;
}

.upload-area .upload-icon {
    font-size: 40px;
    color: #9ca3af;
    margin-bottom: 10px;
}

/* 响应式 */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.mobile-open {
        transform: translateX(0);
    }
    .admin-main {
        margin-left: 0;
    }
    .admin-main.full {
        margin-left: 0;
    }
}

/* 表单 */
.form-label {
    font-weight: 500;
    color: #374151;
}

.form-control,
.form-select {
    border-radius: 6px;
}

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

/* 模态框 */
.modal-content {
    border-radius: 10px;
}

.modal-header {
    border-bottom: 1px solid #e5e7eb;
    padding: 15px 20px;
}

.modal-title {
    font-weight: 600;
}

.modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 12px 20px;
}
