You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1688 lines
26 KiB

/* ============================
Admin 后台管理系统样式
============================ */
/* 基础重置 */
.admin-body {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
background-color: #f8fafc;
color: #2d3748;
line-height: 1.6;
}
/* 主要容器 */
#admin-app {
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* ========== 顶部导航栏 ========== */
.admin-header {
background: #ffffff;
border-bottom: 1px solid #e2e8f0;
padding: 0 1.5rem;
height: 60px;
display: flex;
align-items: center;
justify-content: space-between;
position: sticky;
top: 0;
z-index: 100;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.admin-header-left {
display: flex;
align-items: center;
}
.admin-logo a {
font-size: 1.25rem;
font-weight: 600;
color: #2b6cb0;
text-decoration: none;
}
.admin-header-center {
flex: 1;
display: flex;
justify-content: center;
}
.admin-breadcrumb {
display: flex;
align-items: center;
color: #718096;
font-size: 0.875rem;
}
.breadcrumb-item a {
color: #4299e1;
text-decoration: none;
}
.breadcrumb-separator {
margin: 0 0.5rem;
color: #a0aec0;
}
.admin-header-right {
display: flex;
align-items: center;
}
/* 用户下拉菜单 */
.admin-user-menu {
position: relative;
}
.dropdown {
position: relative;
}
.dropdown-trigger {
background: none;
border: 1px solid #e2e8f0;
border-radius: 6px;
padding: 0.5rem 1rem;
cursor: pointer;
display: flex;
align-items: center;
gap: 0.5rem;
transition: border-color 0.2s;
}
.dropdown-trigger:hover {
border-color: #cbd5e0;
}
.dropdown-arrow {
font-size: 0.75rem;
transition: transform 0.2s;
}
.dropdown.active .dropdown-arrow {
transform: rotate(180deg);
}
.dropdown-menu {
position: absolute;
top: 100%;
right: 0;
background: white;
border: 1px solid #e2e8f0;
border-radius: 6px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
min-width: 160px;
z-index: 200;
opacity: 0;
visibility: hidden;
transform: translateY(-8px);
transition: all 0.2s;
}
.dropdown.active .dropdown-menu {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.dropdown-item {
display: block;
padding: 0.75rem 1rem;
color: #2d3748;
text-decoration: none;
transition: background-color 0.2s;
}
.dropdown-item:hover {
background-color: #f7fafc;
}
.dropdown-divider {
height: 1px;
background: #e2e8f0;
margin: 0.25rem 0;
}
/* ========== 主要内容区域 ========== */
.admin-main {
flex: 1;
display: flex;
min-height: calc(100vh - 60px);
}
/* ========== 左侧导航栏 ========== */
.admin-sidebar {
width: 250px;
background: #ffffff;
border-right: 1px solid #e2e8f0;
padding: 1.5rem 0;
overflow-y: auto;
}
.admin-nav {
height: 100%;
}
.nav-section {
margin-bottom: 2rem;
}
.nav-title {
padding: 0 1.5rem;
font-size: 0.75rem;
font-weight: 600;
color: #a0aec0;
text-transform: uppercase;
letter-spacing: 0.05em;
margin-bottom: 0.5rem;
}
.nav-list {
list-style: none;
margin: 0;
padding: 0;
}
.nav-item {
margin: 0;
}
.nav-link {
display: flex;
align-items: center;
padding: 0.75rem 1.5rem;
color: #4a5568;
text-decoration: none;
transition: all 0.2s;
border-left: 3px solid transparent;
}
.nav-link:hover {
background-color: #f7fafc;
color: #2b6cb0;
}
.nav-link.active {
background-color: #ebf8ff;
color: #2b6cb0;
border-left-color: #4299e1;
font-weight: 500;
}
.nav-icon {
margin-right: 0.75rem;
font-size: 1rem;
}
/* ========== 右侧内容区域 ========== */
.admin-content {
flex: 1;
background: #f8fafc;
overflow-y: auto;
}
.admin-content-inner {
padding: 2rem;
max-width: 1200px;
margin: 0 auto;
}
/* ========== Toast 消息 ========== */
.admin-toast {
position: fixed;
top: 80px;
right: 20px;
background: white;
border: 1px solid #e2e8f0;
border-radius: 8px;
padding: 1rem 1.5rem;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
z-index: 1000;
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
min-width: 300px;
max-width: 500px;
transition: opacity 0.3s;
}
.admin-toast.toast-success {
border-left: 4px solid #48bb78;
background: #f0fff4;
}
.admin-toast.toast-error {
border-left: 4px solid #f56565;
background: #fff5f5;
}
.admin-toast.toast-warning {
border-left: 4px solid #ed8936;
background: #fffaf0;
}
.admin-toast.toast-info {
border-left: 4px solid #4299e1;
background: #ebf8ff;
}
.toast-close {
background: none;
border: none;
cursor: pointer;
font-size: 1.25rem;
color: #a0aec0;
padding: 0;
line-height: 1;
}
.toast-close:hover {
color: #718096;
}
/* ========== 页面组件 ========== */
/* 页面容器 */
.page-container {
background: white;
border-radius: 8px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
overflow: hidden;
}
/* 页面头部 */
.page-header {
padding: 2rem;
border-bottom: 1px solid #e2e8f0;
display: flex;
justify-content: space-between;
align-items: flex-start;
}
.page-header-left {
flex: 1;
}
.page-title {
font-size: 1.875rem;
font-weight: 600;
color: #1a202c;
margin: 0 0 0.5rem 0;
}
.page-subtitle {
color: #718096;
margin: 0;
}
.page-header-right {
flex-shrink: 0;
margin-left: 2rem;
}
/* 面包屑 */
.breadcrumb {
margin-bottom: 1rem;
font-size: 0.875rem;
color: #718096;
}
.breadcrumb a {
color: #4299e1;
text-decoration: none;
}
.breadcrumb-separator {
margin: 0 0.5rem;
}
.breadcrumb-current {
color: #2d3748;
font-weight: 500;
}
/* ========== 表单组件 ========== */
/* 按钮 */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.5rem 1rem;
border: 1px solid transparent;
border-radius: 6px;
font-size: 0.875rem;
font-weight: 500;
text-decoration: none;
cursor: pointer;
transition: all 0.2s;
gap: 0.5rem;
}
.btn-primary {
background: #4299e1;
color: white;
border-color: #4299e1;
}
.btn-primary:hover {
background: #3182ce;
border-color: #3182ce;
}
.btn-secondary {
background: #718096;
color: white;
border-color: #718096;
}
.btn-secondary:hover {
background: #4a5568;
border-color: #4a5568;
}
.btn-success {
background: #48bb78;
color: white;
border-color: #48bb78;
}
.btn-success:hover {
background: #38a169;
border-color: #38a169;
}
.btn-danger {
background: #f56565;
color: white;
border-color: #f56565;
}
.btn-danger:hover {
background: #e53e3e;
border-color: #e53e3e;
}
.btn-outline {
background: transparent;
color: #4a5568;
border-color: #e2e8f0;
}
.btn-outline:hover {
background: #f7fafc;
border-color: #cbd5e0;
}
.btn-sm {
padding: 0.25rem 0.75rem;
font-size: 0.75rem;
}
/* 表单元素 */
.form-group {
margin-bottom: 1.5rem;
}
.form-label {
display: block;
margin-bottom: 0.5rem;
font-weight: 500;
color: #2d3748;
}
.form-input,
.form-select,
.form-textarea {
width: 100%;
padding: 0.75rem;
border: 1px solid #e2e8f0;
border-radius: 6px;
font-size: 0.875rem;
transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
outline: none;
border-color: #4299e1;
box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}
.form-textarea {
resize: vertical;
min-height: 100px;
}
.form-help {
margin-top: 0.25rem;
font-size: 0.75rem;
color: #718096;
}
/* ========== 表格组件 ========== */
.table-container {
overflow-x: auto;
border: 1px solid #e2e8f0;
border-radius: 8px;
}
.table {
width: 100%;
border-collapse: collapse;
}
.table th,
.table td {
padding: 0.75rem 1rem;
text-align: left;
border-bottom: 1px solid #e2e8f0;
}
.table th {
background: #f7fafc;
font-weight: 600;
color: #2d3748;
font-size: 0.875rem;
}
.table tbody tr:hover {
background: #f7fafc;
}
/* ========== 状态徽章 ========== */
.status-badge {
display: inline-flex;
align-items: center;
padding: 0.25rem 0.75rem;
border-radius: 9999px;
font-size: 0.75rem;
font-weight: 500;
gap: 0.25rem;
}
.status-badge.status-published {
background: #c6f6d5;
color: #22543d;
}
.status-badge.status-draft {
background: #feebc8;
color: #744210;
}
.status-badge.status-unread {
background: #bee3f8;
color: #2a4365;
}
.status-badge.status-read {
background: #d6f5d6;
color: #22543d;
}
.status-badge.status-replied {
background: #c6f6d5;
color: #22543d;
}
/* ========== 分页组件 ========== */
.pagination-container {
margin-top: 2rem;
display: flex;
justify-content: center;
}
.pagination {
display: flex;
gap: 0.25rem;
}
.pagination-link {
padding: 0.5rem 0.75rem;
border: 1px solid #e2e8f0;
border-radius: 6px;
color: #4a5568;
text-decoration: none;
transition: all 0.2s;
}
.pagination-link:hover {
background: #f7fafc;
border-color: #cbd5e0;
}
.pagination-link.active {
background: #4299e1;
color: white;
border-color: #4299e1;
}
.pagination-ellipsis {
padding: 0.5rem 0.75rem;
color: #a0aec0;
}
/* ========== 特定页面样式 ========== */
/* 仪表盘 */
.dashboard {
padding: 2rem;
}
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 1.5rem;
margin-bottom: 2rem;
}
.stats-card {
background: white;
border-radius: 8px;
padding: 1.5rem;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
display: flex;
align-items: flex-start;
gap: 1rem;
}
.stats-icon {
font-size: 2rem;
padding: 0.75rem;
border-radius: 8px;
}
.stats-icon-primary {
background: #ebf8ff;
}
.stats-icon-success {
background: #f0fff4;
}
.stats-number {
font-size: 2rem;
font-weight: 600;
color: #1a202c;
margin-bottom: 0.25rem;
}
.stats-label {
color: #718096;
font-size: 0.875rem;
}
.stats-breakdown {
margin-top: 0.5rem;
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
font-size: 0.75rem;
}
.breakdown-item {
color: #718096;
}
.breakdown-value {
font-weight: 500;
color: #2d3748;
}
/* 文章表格 */
.article-table-container {
background: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.article-table {
width: 100%;
border-collapse: collapse;
}
.article-table th {
background: #f7fafc;
padding: 1rem;
font-weight: 600;
color: #2d3748;
border-bottom: 1px solid #e2e8f0;
}
.article-table td {
padding: 1rem;
border-bottom: 1px solid #f1f5f9;
vertical-align: top;
}
.article-row:hover {
background: #f8fafc;
}
.article-title-cell h3 {
margin: 0 0 0.5rem 0;
font-size: 1rem;
font-weight: 500;
}
.article-title-cell a {
color: #2b6cb0;
text-decoration: none;
}
.article-title-cell a:hover {
color: #2c5aa0;
text-decoration: underline;
}
.article-summary {
color: #718096;
font-size: 0.875rem;
margin: 0.5rem 0;
}
.article-tags {
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
margin-top: 0.5rem;
}
.tag {
background: #edf2f7;
color: #4a5568;
padding: 0.125rem 0.5rem;
border-radius: 12px;
font-size: 0.75rem;
}
.category-badge {
background: #e6fffa;
color: #234e52;
padding: 0.25rem 0.75rem;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 500;
}
.date-info {
font-size: 0.875rem;
}
.primary-date {
color: #2d3748;
font-weight: 500;
}
.secondary-date {
color: #718096;
font-size: 0.75rem;
}
.action-buttons {
display: flex;
gap: 0.5rem;
align-items: center;
}
/* 联系信息表格 */
.contact-table-container {
background: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.contact-table {
width: 100%;
border-collapse: collapse;
}
.contact-table th {
background: #f7fafc;
padding: 1rem;
font-weight: 600;
color: #2d3748;
border-bottom: 1px solid #e2e8f0;
}
.contact-table td {
padding: 1rem;
border-bottom: 1px solid #f1f5f9;
vertical-align: top;
}
.contact-row:hover {
background: #f8fafc;
}
.contact-row.status-unread {
background: #f0f9ff;
}
.contact-info {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.contact-name {
font-weight: 500;
color: #2d3748;
}
.contact-email {
color: #4299e1;
font-size: 0.875rem;
}
.contact-ip {
color: #718096;
font-size: 0.75rem;
}
.subject-content h4 {
margin: 0 0 0.5rem 0;
font-size: 1rem;
font-weight: 500;
color: #2d3748;
}
.subject-preview {
color: #718096;
font-size: 0.875rem;
}
.status-dropdown {
margin: 0.25rem 0;
}
.status-select {
padding: 0.25rem 0.5rem;
border: 1px solid #e2e8f0;
border-radius: 4px;
font-size: 0.75rem;
background: white;
}
/* 筛选组件 */
.page-filters {
background: white;
padding: 1.5rem 2rem;
border-bottom: 1px solid #e2e8f0;
}
.filter-form {
display: flex;
gap: 1.5rem;
align-items: flex-end;
flex-wrap: wrap;
}
.filter-group {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.filter-label {
font-size: 0.875rem;
font-weight: 500;
color: #2d3748;
}
.filter-select {
padding: 0.5rem;
border: 1px solid #e2e8f0;
border-radius: 6px;
font-size: 0.875rem;
min-width: 150px;
}
.search-box {
display: flex;
border: 1px solid #e2e8f0;
border-radius: 6px;
overflow: hidden;
}
.search-input {
flex: 1;
padding: 0.5rem 0.75rem;
border: none;
outline: none;
min-width: 200px;
}
.search-btn {
padding: 0.5rem 0.75rem;
background: #4299e1;
color: white;
border: none;
cursor: pointer;
transition: background-color 0.2s;
}
.search-btn:hover {
background: #3182ce;
}
.filter-clear {
color: #e53e3e;
text-decoration: none;
font-size: 0.875rem;
padding: 0.5rem 0;
}
.filter-clear:hover {
text-decoration: underline;
}
/* 内容区域 */
.content-section {
padding: 2rem;
}
/* 空状态 */
.empty-state {
text-align: center;
padding: 4rem 2rem;
color: #718096;
}
.empty-icon {
font-size: 4rem;
margin-bottom: 1rem;
}
.empty-title {
font-size: 1.25rem;
font-weight: 500;
color: #2d3748;
margin-bottom: 0.5rem;
}
.empty-text {
margin-bottom: 1.5rem;
}
/* 列表底部 */
.list-footer {
padding: 1rem 2rem;
border-top: 1px solid #e2e8f0;
background: #f8fafc;
color: #718096;
font-size: 0.875rem;
}
/* ========== 文章管理特定样式 ========== */
/* 文章表单样式 */
.article-form {
background: white;
}
.form-grid {
display: grid;
grid-template-columns: 1fr 300px;
gap: 2rem;
}
.form-main {
flex: 1;
}
.form-sidebar {
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 8px;
padding: 1.5rem;
height: fit-content;
position: sticky;
top: 1rem;
}
.sidebar-section {
margin-bottom: 2rem;
}
.sidebar-section:last-child {
margin-bottom: 0;
}
.sidebar-title {
font-size: 1rem;
font-weight: 600;
color: #2d3748;
margin: 0 0 1rem 0;
border-bottom: 1px solid #e2e8f0;
padding-bottom: 0.5rem;
}
.content-editor {
min-height: 400px;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
font-size: 0.875rem;
line-height: 1.6;
}
.form-actions {
margin-top: 2rem;
padding-top: 2rem;
border-top: 1px solid #e2e8f0;
}
.action-buttons {
display: flex;
gap: 1rem;
align-items: center;
}
/* 文章信息显示 */
.article-meta {
display: flex;
flex-wrap: wrap;
gap: 1rem;
margin-top: 1rem;
font-size: 0.875rem;
}
.meta-item {
display: flex;
align-items: center;
gap: 0.5rem;
}
.article-view {
max-width: none;
}
.article-summary-section,
.article-content-section,
.article-tags-section,
.article-link-section,
.article-technical-section {
margin-bottom: 2rem;
padding: 1.5rem;
border: 1px solid #e2e8f0;
border-radius: 8px;
background: white;
}
.section-title {
font-size: 1.125rem;
font-weight: 600;
color: #2d3748;
margin: 0 0 1rem 0;
padding-bottom: 0.5rem;
border-bottom: 1px solid #e2e8f0;
}
.article-content {
background: #f8fafc;
padding: 1.5rem;
border-radius: 6px;
border: 1px solid #e2e8f0;
line-height: 1.7;
color: #2d3748;
}
.empty-content {
color: #a0aec0;
font-style: italic;
text-align: center;
padding: 2rem;
}
.link-info {
font-size: 0.875rem;
}
.article-link {
color: #4299e1;
text-decoration: none;
margin-left: 0.5rem;
}
.article-link:hover {
text-decoration: underline;
}
.technical-info {
background: #f8fafc;
padding: 1rem;
border-radius: 6px;
border: 1px solid #e2e8f0;
}
.info-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
}
.info-item {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.info-label {
font-size: 0.75rem;
font-weight: 600;
color: #718096;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.info-value {
font-size: 0.875rem;
color: #2d3748;
word-break: break-all;
}
/* ========== 联系信息管理特定样式 ========== */
/* 统计摘要 */
.stats-summary {
display: flex;
gap: 1.5rem;
align-items: center;
}
.stat-item {
display: flex;
flex-direction: column;
align-items: center;
padding: 0.75rem 1rem;
background: white;
border: 1px solid #e2e8f0;
border-radius: 8px;
min-width: 80px;
}
.stat-item.unread {
background: #f0f9ff;
border-color: #bfdbfe;
}
.stat-number {
font-size: 1.5rem;
font-weight: 600;
color: #2d3748;
margin-bottom: 0.25rem;
}
.stat-label {
font-size: 0.75rem;
color: #718096;
text-align: center;
}
/* 联系信息详情 */
.contact-details {
max-width: none;
}
.detail-section {
margin-bottom: 2rem;
padding: 1.5rem;
border: 1px solid #e2e8f0;
border-radius: 8px;
background: white;
}
.subject-content {
font-size: 1.125rem;
font-weight: 500;
color: #2d3748;
line-height: 1.5;
}
.message-content {
background: #f8fafc;
padding: 1.5rem;
border-radius: 6px;
border: 1px solid #e2e8f0;
}
.message-text {
line-height: 1.7;
color: #2d3748;
white-space: pre-wrap;
word-wrap: break-word;
}
.user-agent {
font-size: 0.75rem;
color: #718096;
word-break: break-all;
}
.quick-actions {
background: #f8fafc;
padding: 1.5rem;
border-radius: 6px;
border: 1px solid #e2e8f0;
}
.action-group {
margin-bottom: 1.5rem;
}
.action-group:last-child {
margin-bottom: 0;
}
.action-title {
font-size: 0.875rem;
font-weight: 600;
color: #4a5568;
margin: 0 0 0.75rem 0;
}
.status-actions {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
}
.detail-navigation {
margin-top: 2rem;
padding-top: 2rem;
border-top: 1px solid #e2e8f0;
}
/* ========== 仪表盘特定样式 ========== */
.dashboard-content {
margin-top: 2rem;
}
.dashboard-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
gap: 2rem;
margin-bottom: 2rem;
}
.dashboard-section {
background: white;
border-radius: 8px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
overflow: hidden;
}
.section-header {
padding: 1.5rem 1.5rem 1rem 1.5rem;
border-bottom: 1px solid #e2e8f0;
display: flex;
justify-content: space-between;
align-items: center;
}
.section-title {
font-size: 1.125rem;
font-weight: 600;
color: #2d3748;
margin: 0;
}
.section-action {
color: #4299e1;
text-decoration: none;
font-size: 0.875rem;
font-weight: 500;
}
.section-action:hover {
color: #3182ce;
}
.contact-list,
.article-list {
padding: 0;
}
.contact-item,
.article-item {
padding: 1rem 1.5rem;
border-bottom: 1px solid #f1f5f9;
}
.contact-item:last-child,
.article-item:last-child {
border-bottom: none;
}
.contact-item.status-unread {
background: #f0f9ff;
}
.contact-header,
.article-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 0.5rem;
}
.contact-info,
.article-info {
flex: 1;
}
.contact-name,
.article-title {
font-weight: 500;
color: #2d3748;
margin-bottom: 0.25rem;
}
.contact-email {
color: #4299e1;
font-size: 0.875rem;
}
.contact-meta,
.article-meta {
display: flex;
gap: 1rem;
font-size: 0.75rem;
color: #718096;
}
.contact-status,
.article-status {
padding: 0.125rem 0.5rem;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 500;
}
.contact-status.status-unread,
.article-status.status-draft {
background: #feebc8;
color: #744210;
}
.contact-status.status-read,
.contact-status.status-replied,
.article-status.status-published {
background: #c6f6d5;
color: #22543d;
}
.contact-subject,
.article-summary {
color: #4a5568;
font-size: 0.875rem;
line-height: 1.5;
margin-bottom: 0.75rem;
}
.contact-actions,
.article-actions {
display: flex;
gap: 0.5rem;
}
.quick-actions {
background: white;
border-radius: 8px;
padding: 2rem;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.quick-actions-title {
font-size: 1.25rem;
font-weight: 600;
color: #2d3748;
margin: 0 0 1.5rem 0;
}
.quick-actions-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
}
.quick-action-card {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
padding: 1.5rem;
border: 1px solid #e2e8f0;
border-radius: 8px;
text-decoration: none;
color: #2d3748;
transition: all 0.2s;
}
.quick-action-card:hover {
border-color: #4299e1;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
transform: translateY(-2px);
}
.quick-action-icon {
font-size: 2rem;
margin-bottom: 0.75rem;
}
.quick-action-title {
font-weight: 600;
margin-bottom: 0.5rem;
}
.quick-action-desc {
font-size: 0.875rem;
color: #718096;
}
/* ========== 通用增强样式 ========== */
.text-muted {
color: #a0aec0;
}
.bulk-actions {
padding: 1rem 2rem;
background: #f8fafc;
border-top: 1px solid #e2e8f0;
font-size: 0.875rem;
color: #718096;
}
.bulk-info {
text-align: center;
}
/* 文章和联系信息表格列宽 */
.col-title {
width: 40%;
}
.col-contact {
width: 25%;
}
.col-subject {
width: 35%;
}
.col-status {
width: 12%;
}
.col-category {
width: 15%;
}
.col-date {
width: 15%;
}
.col-actions {
width: 18%;
}
/* 编辑器增强样式 */
.editor-toolbar {
display: flex;
gap: 0.5rem;
padding: 0.75rem;
background: #f8fafc;
border: 1px solid #e2e8f0;
border-bottom: none;
border-radius: 6px 6px 0 0;
flex-wrap: wrap;
}
.editor-toolbar-group {
display: flex;
gap: 0.25rem;
padding: 0 0.5rem;
border-right: 1px solid #e2e8f0;
}
.editor-toolbar-group:last-child {
border-right: none;
}
.editor-btn {
background: none;
border: 1px solid transparent;
border-radius: 4px;
padding: 0.25rem 0.5rem;
cursor: pointer;
font-size: 0.875rem;
transition: all 0.2s;
line-height: 1;
}
.editor-btn:hover {
background: #e2e8f0;
border-color: #cbd5e0;
}
.editor-toolbar + .form-textarea {
border-radius: 0 0 6px 6px;
border-top: none;
}
/* 表单验证错误样式 */
.field-error {
color: #f56565;
font-size: 0.75rem;
margin-top: 0.25rem;
display: block;
}
.form-input.error,
.form-textarea.error,
.form-select.error {
border-color: #f56565;
box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1);
}
/* 加载状态 */
.loading {
opacity: 0.6;
pointer-events: none;
position: relative;
}
.loading::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 20px;
height: 20px;
margin: -10px 0 0 -10px;
border: 2px solid #e2e8f0;
border-top: 2px solid #4299e1;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* 选中状态 */
.selected {
background-color: #ebf8ff !important;
}
/* 高亮显示 */
.highlight {
background: #fef5e7;
border: 1px solid #f6e05e;
border-radius: 4px;
padding: 0.25rem 0.5rem;
animation: highlight-fade 2s ease-out;
}
@keyframes highlight-fade {
0% { background: #fef5e7; }
100% { background: transparent; }
}
/* 工具提示 */
.tooltip {
position: relative;
display: inline-block;
}
.tooltip::after {
content: attr(data-tooltip);
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
background: #1a202c;
color: white;
padding: 0.5rem;
border-radius: 4px;
font-size: 0.75rem;
white-space: nowrap;
opacity: 0;
visibility: hidden;
transition: all 0.2s;
z-index: 1000;
margin-bottom: 5px;
}
.tooltip::before {
content: '';
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
border: 5px solid transparent;
border-top-color: #1a202c;
opacity: 0;
visibility: hidden;
transition: all 0.2s;
}
.tooltip:hover::after,
.tooltip:hover::before {
opacity: 1;
visibility: visible;
}
/* 响应式设计 */
@media (max-width: 1024px) {
.form-grid {
grid-template-columns: 1fr;
}
.form-sidebar {
position: static;
margin-top: 2rem;
}
.dashboard-grid {
grid-template-columns: 1fr;
}
.quick-actions-grid {
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
}
@media (max-width: 768px) {
.admin-header {
padding: 0 1rem;
}
.admin-sidebar {
position: fixed;
left: -250px;
top: 60px;
height: calc(100vh - 60px);
z-index: 50;
transition: left 0.3s;
}
.sidebar-open .admin-sidebar {
left: 0;
}
.admin-content-inner {
padding: 1rem;
}
.page-header {
flex-direction: column;
gap: 1rem;
align-items: stretch;
}
.page-header-right {
margin-left: 0;
}
.filter-form {
flex-direction: column;
align-items: stretch;
}
.stats-grid {
grid-template-columns: 1fr;
}
.stats-summary {
flex-wrap: wrap;
justify-content: center;
}
.table-container {
font-size: 0.875rem;
}
.article-table th,
.article-table td,
.contact-table th,
.contact-table td {
padding: 0.5rem;
}
.action-buttons {
flex-direction: column;
align-items: stretch;
}
.status-actions {
flex-direction: column;
}
.quick-actions-grid {
grid-template-columns: 1fr;
}
/* 隐藏部分表格列在小屏幕上 */
.col-category,
.col-date .secondary-date {
display: none;
}
.article-tags,
.contact-ip {
display: none;
}
}