admin.css•19.7 kB
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
color: #333;
}
.header {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
padding: 1rem 2rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.header h1 {
color: white;
font-size: 1.5rem;
font-weight: 600;
}
.nav {
margin-top: 0.5rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.nav-left {
display: flex;
}
.nav-right {
display: flex;
}
.nav-item {
display: inline-block;
color: rgba(255, 255, 255, 0.9);
text-decoration: none;
padding: 0.5rem 1rem;
margin-right: 1rem;
border-radius: 6px;
background: rgba(255, 255, 255, 0.1);
transition: all 0.2s ease;
}
.nav-item.active, .nav-item:hover {
background: rgba(255, 255, 255, 0.2);
color: white;
}
.nav-item.logout {
background: rgba(255, 87, 87, 0.1);
border: 1px solid rgba(255, 87, 87, 0.3);
}
.nav-item.logout:hover {
background: rgba(255, 87, 87, 0.2);
color: #ffdddd;
}
.container {
max-width: 95%;
margin: 2rem auto;
padding: 0 2rem;
}
.card {
background: white;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
overflow: hidden;
margin-bottom: 2rem;
}
.card-header {
background: #f8fafc;
padding: 1.5rem 2rem;
border-bottom: 1px solid #e2e8f0;
display: flex;
justify-content: space-between;
align-items: center;
}
.card-title {
font-size: 1.25rem;
font-weight: 600;
color: #1a202c;
}
.stats {
display: flex;
gap: 1rem;
}
.stat-item {
background: #4c51bf;
color: white;
padding: 0.5rem 1rem;
border-radius: 6px;
min-width: fit-content;
white-space: nowrap;
font-size: 0.875rem;
font-weight: 500;
}
.table-container {
overflow-x: auto;
}
.table {
width: 100%;
border-collapse: collapse;
}
.table th {
background: #f7fafc;
color: #4a5568;
font-weight: 600;
padding: 1rem 1.5rem;
text-align: left;
border-bottom: 2px solid #e2e8f0;
font-size: 0.875rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.table td {
padding: 1rem 1.5rem;
border-bottom: 1px solid #e2e8f0;
vertical-align: middle;
}
.table tbody tr:hover {
background: #f7fafc;
}
.switch {
position: relative;
display: inline-block;
width: 50px;
height: 28px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #cbd5e0;
transition: 0.3s;
border-radius: 28px;
}
.slider:before {
position: absolute;
content: "";
height: 20px;
width: 20px;
left: 4px;
bottom: 4px;
background-color: white;
transition: 0.3s;
border-radius: 50%;
}
input:checked + .slider {
background-color: #48bb78;
}
input:checked + .slider:before {
transform: translateX(22px);
}
.category-badge {
display: inline-block;
background: #e2e8f0;
color: #4a5568;
padding: 0.25rem 0.75rem;
border-radius: 20px;
font-size: 0.75rem;
font-weight: 500;
}
.playbook-id {
font-family: 'Monaco', 'Menlo', monospace;
color: #805ad5;
font-weight: 600;
font-size: 0.9rem;
cursor: pointer;
transition: all 0.2s ease;
}
.playbook-id:hover {
color: #553c9a;
text-decoration: underline;
}
.playbook-display-name {
color: #2d3748;
font-weight: 500;
font-size: 0.95rem;
}
.loading {
text-align: center;
padding: 3rem;
color: #718096;
}
.error {
background: #fed7d7;
color: #c53030;
padding: 1rem;
border-radius: 8px;
margin-bottom: 1rem;
}
.success {
background: #c6f6d5;
color: #2f855a;
padding: 1rem;
border-radius: 8px;
margin-bottom: 1rem;
}
/* Modal 样式 */
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(5px);
}
.modal-content {
background-color: white;
margin: 5% auto;
padding: 0;
border-radius: 12px;
width: 90%;
max-width: 800px;
max-height: 80vh;
overflow-y: auto;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.modal-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 1.5rem 2rem;
border-radius: 12px 12px 0 0;
display: flex;
justify-content: space-between;
align-items: center;
}
.modal-title {
font-size: 1.25rem;
font-weight: 600;
margin: 0;
}
.close {
color: rgba(255, 255, 255, 0.8);
font-size: 2rem;
font-weight: bold;
cursor: pointer;
background: none;
border: none;
padding: 0;
line-height: 1;
transition: color 0.2s ease;
}
.close:hover {
color: white;
}
.modal-body {
padding: 2rem;
}
.detail-section {
margin-bottom: 2rem;
}
.detail-section:last-child {
margin-bottom: 0;
}
.detail-label {
font-weight: 600;
color: #4a5568;
font-size: 0.875rem;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 0.5rem;
}
.detail-value {
color: #2d3748;
font-size: 0.95rem;
line-height: 1.5;
}
.param-item {
background: #f7fafc;
border: 1px solid #e2e8f0;
border-radius: 8px;
padding: 1rem;
margin-bottom: 1rem;
}
.param-item:last-child {
margin-bottom: 0;
}
.param-name {
font-weight: 600;
color: #805ad5;
margin-bottom: 0.5rem;
}
.param-type {
display: inline-block;
background: #4c51bf;
color: white;
padding: 0.25rem 0.5rem;
border-radius: 4px;
font-size: 0.75rem;
margin-right: 0.5rem;
}
.param-required {
color: #e53e3e;
font-size: 0.75rem;
font-weight: 500;
}
.param-description {
color: #718096;
font-size: 0.875rem;
margin-top: 0.5rem;
}
@media (max-width: 768px) {
.container {
padding: 0 1rem;
max-width: 100%;
}
.header {
padding: 1rem;
}
.card-header {
padding: 1rem;
}
.table th,
.table td {
padding: 0.75rem 0.5rem;
}
.stats {
flex-wrap: wrap;
}
.modal-content {
width: 95%;
margin: 2% auto;
}
.modal-header {
padding: 1rem;
}
.modal-body {
padding: 1rem;
}
}
/* 分页控件样式 */
.pagination-container {
margin: 2rem 0;
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem;
background: white;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.pagination-info {
font-size: 0.9rem;
color: #666;
}
.pagination-controls {
display: flex;
align-items: center;
gap: 0.5rem;
}
.pagination-btn {
padding: 0.5rem 1rem;
border: 1px solid #ddd;
background: white;
color: #333;
border-radius: 4px;
cursor: pointer;
transition: all 0.2s;
font-size: 0.9rem;
}
.pagination-btn:hover:not(:disabled) {
background: #f8f9fa;
border-color: #007bff;
color: #007bff;
}
.pagination-btn:disabled {
background: #f5f5f5;
color: #999;
cursor: not-allowed;
}
.page-numbers {
display: flex;
gap: 0.25rem;
}
.page-number {
padding: 0.5rem 0.75rem;
border: 1px solid #ddd;
background: white;
color: #333;
border-radius: 4px;
cursor: pointer;
transition: all 0.2s;
font-size: 0.9rem;
min-width: 36px;
text-align: center;
}
.page-number:hover {
background: #f8f9fa;
border-color: #007bff;
color: #007bff;
}
.page-number.active {
background: #007bff;
border-color: #007bff;
color: white;
}
.page-number.ellipsis {
cursor: default;
border: none;
background: transparent;
}
.page-number.ellipsis:hover {
background: transparent;
color: #333;
}
/* 系统配置样式 */
.config-actions {
display: flex;
gap: 0.5rem;
}
.btn {
padding: 0.5rem 1rem;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 0.9rem;
transition: all 0.2s;
text-decoration: none;
display: inline-flex;
align-items: center;
justify-content: center;
}
.btn-primary {
background: #007bff;
color: white;
}
.btn-primary:hover {
background: #0056b3;
}
.btn-secondary {
background: #6c757d;
color: white;
}
.btn-secondary:hover {
background: #545b62;
}
.config-container {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 2rem;
padding: 2rem;
}
.config-form {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.form-group {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.form-group .label-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.25rem;
}
.form-group label {
font-weight: 600;
color: #333;
margin: 0;
}
.form-group .form-help {
font-size: 0.85em;
color: #666;
margin: 0;
font-style: italic;
}
/* 同步周期选择框样式 */
#sync-interval {
max-width: 150px;
}
.form-input {
padding: 0.75rem;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 0.9rem;
transition: border-color 0.2s;
}
.form-input:focus {
outline: none;
border-color: #007bff;
box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}
.form-help {
font-size: 0.8rem;
color: #666;
}
.password-input-container {
position: relative;
display: flex;
align-items: center;
}
.password-input-container .form-input {
padding-right: 3rem;
width: 100%;
min-width: 400px;
}
.password-toggle {
position: absolute;
right: 0.75rem;
background: none;
border: none;
cursor: pointer;
padding: 0.25rem;
font-size: 1rem;
color: #666;
z-index: 1;
}
.password-toggle:hover {
color: #333;
}
.status-success {
color: #28a745;
font-weight: bold;
}
.status-error {
color: #dc3545;
font-weight: bold;
}
.status-warning {
color: #ffc107;
font-weight: bold;
}
/* 限制特定输入框的宽度 */
#soar-timeout {
max-width: 120px;
}
.labels-container {
display: flex;
flex-direction: column;
gap: 1rem;
}
.labels-input {
display: flex;
gap: 0.5rem;
}
.labels-input .form-input {
flex: 1;
}
.labels-list {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
min-height: 2rem;
}
.label-tag {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.25rem 0.75rem;
background: #e3f2fd;
color: #1976d2;
border-radius: 16px;
font-size: 0.8rem;
border: 1px solid #bbdefb;
}
.label-tag .remove-label {
background: none;
border: none;
color: #1976d2;
cursor: pointer;
font-size: 1rem;
line-height: 1;
padding: 0;
width: 16px;
height: 16px;
display: flex;
align-items: center;
justify-content: center;
}
.label-tag .remove-label:hover {
background: #1976d2;
color: white;
border-radius: 50%;
}
.config-status {
background: #f8f9fa;
padding: 1.5rem;
border-radius: 8px;
border: 1px solid #e9ecef;
}
.config-status h3 {
margin-bottom: 1rem;
color: #495057;
font-size: 1.1rem;
}
.status-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.5rem 0;
border-bottom: 1px solid #e9ecef;
}
.status-item:last-child {
border-bottom: none;
}
.status-label {
font-weight: 600;
color: #495057;
}
.status-value {
color: #6c757d;
}
.status-success {
color: #28a745 !important;
}
.status-error {
color: #dc3545 !important;
}
.status-warning {
color: #ffc107 !important;
}
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 1.5rem;
margin-bottom: 2rem;
}
.stat-card {
background: #fff;
padding: 1.5rem;
border-radius: 8px;
border: 1px solid #e2e8f0;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}
.stat-card h3 {
margin: 0 0 1rem 0;
color: #495057;
font-size: 1.1rem;
font-weight: 600;
border-bottom: 2px solid #e9ecef;
padding-bottom: 0.5rem;
}
.stats-grid .stat-item {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.75rem;
padding: 0.75rem;
border-radius: 6px;
background: #f8f9fa;
border: 1px solid #e9ecef;
}
.stats-grid .stat-item:last-child {
margin-bottom: 0;
}
.stat-label {
font-weight: 500;
color: #495057;
}
.stat-value {
font-weight: 600;
color: #007bff;
}
@media (max-width: 768px) {
.config-container {
grid-template-columns: 1fr;
gap: 1rem;
padding: 1rem;
}
.stats-grid {
grid-template-columns: 1fr;
gap: 1rem;
}
.labels-input {
flex-direction: column;
}
.config-actions {
flex-direction: column;
}
}