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81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
/* 全局样式 */
:root {
    --sidebar-width: 250px;
    --sidebar-bg: #343a40;
    --sidebar-color: #fff;
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --transition-speed: 0.3s;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', 'Arial', sans-serif;
    background-color: #f8f9fa;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* 登录页面样式 */
#login-container, .login-container {
    background-color: #f8f9fa;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1050;
    align-items: center;
    justify-content: center;
}

#login-container .card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    overflow: hidden;
    width: 400px;
    max-width: 90%;
}

#login-container .card-header {
    background-color: var(--primary-color);
    padding: 1.5rem 1rem;
}

#login-container .bi-shield-lock {
    color: var(--primary-color);
}

#login-form .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.6rem 1.2rem;
    font-weight: 500;
}

#login-form .btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

#login-error {
    border-radius: 8px;
}

/* 页面布局 */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    align-items: stretch;
    position: relative;
}

/* 侧边栏样式 */
#sidebar {
    min-width: 250px;
    max-width: 250px;
    background: var(--sidebar-bg);
    color: var(--sidebar-color);
    transition: all var(--transition-speed);
    height: 100vh;
    position: fixed;
    z-index: 999;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    top: 0;
    left: 0;
}

#sidebar.active {
    margin-left: -250px;
}

#sidebar .sidebar-header {
    padding: 20px;
    background: #212529;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebar ul.components {
    padding: 20px 0;
    height: calc(100vh - 140px);
    overflow-y: auto;
}

#sidebar ul li a {
    padding: 12px 20px;
    font-size: 1.1em;
    display: block;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

#sidebar ul li a:hover {
    background: #495057;
    border-left: 3px solid var(--primary-color);
}

#sidebar ul li.active > a {
    background: var(--primary-color);
    color: white;
    border-left: 3px solid #fff;
}

#sidebar ul li.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: absolute;
    bottom: 0;
    width: 100%;
}

#sidebar ul li.sidebar-footer a {
    color: rgba(255, 255, 255, 0.8);
}

#sidebar ul li.sidebar-footer a:hover {
    background: rgba(220, 53, 69, 0.6);
    color: white;
}

/* 主内容区样式 */
#content {
    width: calc(100% - 250px);
    padding: 0;
    min-height: 100vh;
    transition: all 0.3s;
    position: absolute;
    right: 0;
    overflow-x: hidden;
}

#content.active {
    width: 100%;
}

/* 内容页面样式 */
.content-page {
    display: none;
    padding: 0 20px 30px;
}

.content-page.active {
    display: block;
    animation: fadeIn 0.3s;
}

/* 表格样式 */
.table th {
    font-weight: 600;
    border-top: none;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

/* 状态标签样式 */
.status-badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 85%;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    cursor: help;
}

.status-enabled {
    background-color: var(--success-color);
    color: white;
}

.status-disabled {
    background-color: var(--danger-color);
    color: white;
}

.status-temp-disabled {
    background-color: var(--warning-color);
    color: black;
    position: relative;
}

/* 为临时禁用状态的提示信息添加样式 */
.small.text-muted {
    font-size: 0.75rem;
    display: block;
    margin-top: 3px;
}

/* 让状态标签支持鼠标悬停提示 */
.status-badge:hover {
    background-color: #ffd700;
    color: black;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -250px;
    }
    #sidebar.active {
        margin-left: 0;
    }
    #content {
        width: 100%;
    }
    #content.active {
        width: calc(100% - 250px);
    }
    #sidebarCollapse {
        display: block;
    }
    .navbar .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* 卡片样式美化 */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 20px;
    font-weight: 500;
}

.card-body {
    padding: 20px;
}

/* 按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

/* 表单元素样式 */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* 操作按钮样式 */
.action-btn {
    margin-right: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    padding: 0;
    border-radius: 50%;
}

.action-btn i {
    font-size: 0.9rem;
}

/* 密钥值样式 */
.key-value {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: monospace;
    font-size: 0.9rem;
}

/* 统计卡片样式 */
.card.bg-primary, .card.bg-success, .card.bg-danger, .card.bg-info {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.card.bg-primary:hover, .card.bg-success:hover, .card.bg-danger:hover, .card.bg-info:hover {
    transform: translateY(-5px);
}

.card.bg-primary .card-title, .card.bg-success .card-title, 
.card.bg-danger .card-title, .card.bg-info .card-title {
    font-size: 1rem;
    opacity: 0.9;
}

.card.bg-primary .card-text, .card.bg-success .card-text, 
.card.bg-danger .card-text, .card.bg-info .card-text {
    font-size: 1.8rem;
    font-weight: 600;
}

/* 图表容器 */
canvas {
    width: 100% !important;
    height: 300px !important;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    background-color: #fff !important;
}

/* 管理员密钥显示 */
#admin-key-display {
    font-size: 0.8rem;
    font-family: monospace;
}

/* Toast通知样式 */
.toast {
    border-radius: 8px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 最近的API密钥列表样式 */
#recent-keys-list .list-group-item {
    padding: 0.75rem 1rem;
    border-left: none;
    border-right: none;
}

#recent-keys-list .list-group-item:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* 模态框样式 */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* 分页样式 */
.pagination {
    margin-bottom: 0;
}

.page-link {
    color: var(--primary-color);
    border-radius: 4px;
    margin: 0 2px;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 搜索框样式 */
#search-keys {
    min-width: 250px;
    border-radius: 20px;
    padding-left: 15px;
    padding-right: 15px;
}