454 lines
7.8 KiB
CSS
454 lines
7.8 KiB
CSS
/* 管理后台样式 */
|
|
:root {
|
|
--admin-primary: #8a5fad;
|
|
--admin-secondary: #d291bc;
|
|
--admin-dark: #5e4b6b;
|
|
--admin-light: #f8f4ff;
|
|
--admin-gray: #e9e3f5;
|
|
--admin-success: #6bbd85;
|
|
--admin-error: #e65c8f;
|
|
--admin-warning: #f3a754;
|
|
}
|
|
|
|
.admin-body {
|
|
margin: 0;
|
|
padding: 0;
|
|
background-color: #f3f0f8;
|
|
color: #333;
|
|
font-family: 'Segoe UI', Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
min-height: 100vh;
|
|
display: flex;
|
|
}
|
|
|
|
/* 登录页面样式 */
|
|
.admin-container {
|
|
width: 100%;
|
|
height: 100vh;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
background: linear-gradient(135deg, #f5e8f0 0%, #f3e5fc 100%);
|
|
}
|
|
|
|
.admin-card {
|
|
width: 400px;
|
|
background-color: white;
|
|
border-radius: 10px;
|
|
box-shadow: 0 5px 20px rgba(138, 95, 173, 0.1);
|
|
padding: 30px;
|
|
}
|
|
|
|
.admin-header {
|
|
text-align: center;
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.admin-header h1 {
|
|
color: var(--admin-primary);
|
|
margin-bottom: 10px;
|
|
font-size: 1.8em;
|
|
}
|
|
|
|
.admin-header p {
|
|
color: var(--admin-secondary);
|
|
font-size: 1.1em;
|
|
}
|
|
|
|
.alert {
|
|
padding: 12px 15px;
|
|
border-radius: 5px;
|
|
margin-bottom: 20px;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
.alert-error {
|
|
background-color: #ffecf1;
|
|
color: var(--admin-error);
|
|
border-left: 4px solid var(--admin-error);
|
|
}
|
|
|
|
.alert-success {
|
|
background-color: #ecf9f2;
|
|
color: var(--admin-success);
|
|
border-left: 4px solid var(--admin-success);
|
|
}
|
|
|
|
.admin-form .form-group {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.admin-form label {
|
|
display: block;
|
|
color: var(--admin-dark);
|
|
margin-bottom: 8px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.admin-form input {
|
|
width: 100%;
|
|
padding: 12px 15px;
|
|
border: 1px solid var(--admin-gray);
|
|
border-radius: 5px;
|
|
font-size: 1em;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.admin-form input:focus {
|
|
outline: none;
|
|
border-color: var(--admin-primary);
|
|
box-shadow: 0 0 0 3px rgba(138, 95, 173, 0.1);
|
|
}
|
|
|
|
.admin-btn {
|
|
width: 100%;
|
|
padding: 12px;
|
|
background-color: var(--admin-primary);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 5px;
|
|
font-size: 1em;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.admin-btn:hover {
|
|
background-color: #7b4f9d;
|
|
}
|
|
|
|
.admin-footer {
|
|
margin-top: 25px;
|
|
text-align: center;
|
|
}
|
|
|
|
.back-link {
|
|
color: var(--admin-primary);
|
|
text-decoration: none;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
.back-link:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
/* 仪表盘布局 */
|
|
.admin-sidebar {
|
|
width: 250px;
|
|
background-color: var(--admin-dark);
|
|
color: white;
|
|
height: 100vh;
|
|
position: fixed;
|
|
left: 0;
|
|
top: 0;
|
|
}
|
|
|
|
.admin-sidebar-header {
|
|
padding: 20px;
|
|
text-align: center;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
.admin-sidebar-header h2 {
|
|
margin: 0 0 5px;
|
|
font-size: 1.4em;
|
|
color: white;
|
|
}
|
|
|
|
.admin-sidebar-header p {
|
|
margin: 0;
|
|
font-size: 0.9em;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.admin-menu {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.admin-menu li {
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.admin-menu li a {
|
|
display: block;
|
|
padding: 12px 20px;
|
|
color: white;
|
|
text-decoration: none;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.admin-menu li a i {
|
|
margin-right: 10px;
|
|
width: 20px;
|
|
text-align: center;
|
|
}
|
|
|
|
.admin-menu li a:hover {
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
.admin-menu li.active a {
|
|
background-color: rgba(255, 255, 255, 0.15);
|
|
font-weight: 600;
|
|
border-left: 4px solid var(--admin-secondary);
|
|
}
|
|
|
|
.admin-main {
|
|
flex-grow: 1;
|
|
margin-left: 250px;
|
|
padding: 20px;
|
|
}
|
|
|
|
.admin-header-bar {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 30px;
|
|
background-color: white;
|
|
padding: 15px 20px;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.admin-header-bar h1 {
|
|
margin: 0;
|
|
font-size: 1.5em;
|
|
color: var(--admin-dark);
|
|
}
|
|
|
|
.admin-user {
|
|
font-size: 0.9em;
|
|
color: var(--admin-primary);
|
|
}
|
|
|
|
.admin-content {
|
|
background-color: white;
|
|
padding: 25px;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
/* 统计卡片 */
|
|
.admin-stats {
|
|
display: flex;
|
|
gap: 20px;
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.stat-card {
|
|
background-color: var(--admin-light);
|
|
border-radius: 8px;
|
|
padding: 15px;
|
|
flex-grow: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
|
|
}
|
|
|
|
.stat-icon {
|
|
width: 50px;
|
|
height: 50px;
|
|
background-color: var(--admin-primary);
|
|
border-radius: 50%;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
margin-right: 15px;
|
|
}
|
|
|
|
.stat-icon i {
|
|
color: white;
|
|
font-size: 1.2em;
|
|
}
|
|
|
|
.stat-info h3 {
|
|
margin: 0;
|
|
font-size: 1.8em;
|
|
color: var(--admin-primary);
|
|
}
|
|
|
|
.stat-info p {
|
|
margin: 5px 0 0;
|
|
font-size: 0.9em;
|
|
color: var(--admin-dark);
|
|
}
|
|
|
|
/* 表格样式 */
|
|
.admin-table-container {
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.admin-table-container h2 {
|
|
margin-top: 0;
|
|
color: var(--admin-dark);
|
|
margin-bottom: 15px;
|
|
font-size: 1.2em;
|
|
}
|
|
|
|
.admin-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
.admin-table th,
|
|
.admin-table td {
|
|
text-align: left;
|
|
padding: 12px 15px;
|
|
border-bottom: 1px solid var(--admin-gray);
|
|
}
|
|
|
|
.admin-table th {
|
|
background-color: var(--admin-light);
|
|
color: var(--admin-dark);
|
|
font-weight: 600;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
.admin-table tr:hover {
|
|
background-color: #fdfbff;
|
|
}
|
|
|
|
.bottle-id {
|
|
font-family: monospace;
|
|
font-size: 0.8em;
|
|
color: #666;
|
|
}
|
|
|
|
.bottle-message {
|
|
max-width: 300px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.delete-btn {
|
|
background-color: #ffeaef;
|
|
color: var(--admin-error);
|
|
border: none;
|
|
padding: 6px 10px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 0.85em;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.delete-btn:hover {
|
|
background-color: var(--admin-error);
|
|
color: white;
|
|
}
|
|
|
|
.no-data {
|
|
text-align: center;
|
|
padding: 30px;
|
|
color: #888;
|
|
background-color: #f9f9f9;
|
|
border-radius: 5px;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
/* 设置页面 */
|
|
.settings-card {
|
|
background-color: white;
|
|
border-radius: 8px;
|
|
padding: 25px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.settings-card h2 {
|
|
margin-top: 0;
|
|
color: var(--admin-dark);
|
|
margin-bottom: 10px;
|
|
font-size: 1.3em;
|
|
}
|
|
|
|
.settings-description {
|
|
color: #777;
|
|
margin-bottom: 30px;
|
|
font-size: 0.95em;
|
|
}
|
|
|
|
.settings-form .form-group {
|
|
margin-bottom: 25px;
|
|
}
|
|
|
|
.settings-form label {
|
|
display: block;
|
|
margin-bottom: 10px;
|
|
color: var(--admin-dark);
|
|
}
|
|
|
|
.setting-hint {
|
|
font-size: 0.85em;
|
|
color: var(--admin-secondary);
|
|
margin-left: 10px;
|
|
}
|
|
|
|
.settings-form input[type="number"] {
|
|
width: 120px;
|
|
padding: 8px 12px;
|
|
border: 1px solid var(--admin-gray);
|
|
border-radius: 4px;
|
|
font-size: 1em;
|
|
}
|
|
|
|
.settings-form input[type="number"]:focus {
|
|
outline: none;
|
|
border-color: var(--admin-primary);
|
|
box-shadow: 0 0 0 3px rgba(138, 95, 173, 0.1);
|
|
}
|
|
|
|
.save-btn {
|
|
background-color: var(--admin-success);
|
|
color: white;
|
|
border: none;
|
|
padding: 10px 20px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 1em;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.save-btn:hover {
|
|
background-color: #5aa975;
|
|
}
|
|
|
|
.settings-note {
|
|
background-color: #fffbeb;
|
|
padding: 15px;
|
|
border-radius: 5px;
|
|
margin-top: 30px;
|
|
border-left: 4px solid var(--admin-warning);
|
|
}
|
|
|
|
.settings-note p {
|
|
margin: 0;
|
|
color: #997328;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
/* 响应式设计 */
|
|
@media (max-width: 768px) {
|
|
.admin-body {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.admin-sidebar {
|
|
width: 100%;
|
|
height: auto;
|
|
position: relative;
|
|
}
|
|
|
|
.admin-main {
|
|
margin-left: 0;
|
|
}
|
|
|
|
.admin-stats {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.admin-card {
|
|
width: 90%;
|
|
}
|
|
}
|