* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.ck-editor__editable {
    min-height: 200px;
}

.ck-editor__editable:focus {
    border-color: #00ff00;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    line-height: 1.6;
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(90deg, #1a0000 0%, #2a0000 100%);
    color: white;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    z-index: 1000;
}

.topbar-logo {
    padding: 0 20px;
    border-right: 1px solid rgba(255,255,255,0.1);
    height: 100%;
    display: flex;
    align-items: center;
}

.topbar-logo h1 {
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    color: #00ff00;
}

.topbar-nav {
    flex: 1;
    display: flex;
    padding: 0 10px;
    overflow-x: auto;
}

.topbar-nav a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #cccccc;
    text-decoration: none;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.topbar-nav a:hover {
    background: rgba(255,0,0,0.2);
    color: #00ff00;
}

.topbar-nav a.active {
    background: rgba(255,0,0,0.15);
    color: #00ff00;
    border-bottom-color: #ff0000;
}

.topbar-nav a.logout {
    margin-left: auto;
    background: rgba(255,0,0,0.2);
}

.topbar-nav a.logout:hover {
    background: rgba(255,0,0,0.4);
}

.topbar-nav .icon {
    margin-right: 8px;
    font-size: 16px;
}

.main-content {
    margin-top: 60px;
    padding: 20px;
    min-height: calc(100vh - 60px);
}

.menu-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1001;
    background: #ff0000;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 18px;
    cursor: pointer;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 999;
}

@media (max-width: 768px) {
    .topbar {
        flex-wrap: wrap;
        height: auto;
        padding: 10px;
    }
    
    .topbar-logo {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding: 0 10px;
        width: 100%;
    }
    
    .topbar-nav {
        padding: 10px 0;
    }
    
    .topbar-nav a {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .topbar-nav .icon {
        margin-right: 5px;
    }
    
    .main-content {
        margin-top: 120px;
        padding: 15px;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.card h2 {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
    color: #00ff00;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.stat-card h3 {
    font-size: 14px;
    color: #888;
    margin-bottom: 8px;
}

.stat-card .value {
    font-size: 28px;
    font-weight: bold;
    color: #00ff00;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: #ff0000;
    color: white;
}

.btn-primary:hover {
    background: #cc0000;
}

.btn-success {
    background: #00ff00;
    color: #000;
}

.btn-success:hover {
    background: #00cc00;
}

.btn-warning {
    background: #ff6600;
    color: white;
}

.btn-warning:hover {
    background: #cc5200;
}

.btn-danger {
    background: #ff0000;
    color: white;
}

.btn-danger:hover {
    background: #cc0000;
}

.btn-secondary {
    background: #444;
    color: white;
}

.btn-secondary:hover {
    background: #333;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    line-height: 1;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #00ff00;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #333;
    border-radius: 4px;
    font-size: 14px;
    background: #1a1a1a;
    color: #ffffff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00ff00;
}

.form-group textarea {
    min-height: 200px;
    resize: vertical;
}

.input-with-btn {
    display: flex;
    gap: 8px;
}

.input-with-btn input {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

table th,
table td {
    padding: 12px 8px;
    text-align: left;
    vertical-align: middle;
    box-sizing: border-box;
    overflow: visible;
}

table th {
    background: #1a1a1a;
    font-weight: 600;
    color: #00ff00;
    border-bottom: 2px solid #ff0000;
}

table tr:hover {
    background: #222;
}

.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.toolbar input,
.toolbar select {
    padding: 8px 12px;
    border: 1px solid #333;
    border-radius: 4px;
    font-size: 14px;
    background: #1a1a1a;
    color: #ffffff;
}

.search-input {
    flex: 1;
    max-width: 300px;
    min-width: 150px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #333;
    border-radius: 4px;
    text-decoration: none;
    color: #ffffff;
    background: #1a1a1a;
}

.pagination a:hover {
    background: #ff0000;
    color: white;
    border-color: #ff0000;
}

.pagination .active {
    background: #ff0000;
    color: white;
    border-color: #ff0000;
}

.detail-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #333;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    width: 120px;
    color: #888;
    font-weight: 500;
}

.detail-value {
    flex: 1;
    color: #ffffff;
}

.info-box {
    background: #1a0000;
    border: 1px solid #ff0000;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.info-box h3 {
    color: #ff0000;
    margin-bottom: 10px;
}

.info-list {
    list-style: none;
}

.info-list li {
    padding: 8px 0;
    border-bottom: 1px solid #333;
}

.info-list li:last-child {
    border-bottom: none;
}

.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #333;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff0000;
}

.timeline-date {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.timeline-content {
    background: #1a1a1a;
    padding: 10px;
    border-radius: 4px;
}

.empty {
    text-align: center;
    padding: 40px;
    color: #888;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.badge-default {
    background: #333;
    color: #ffffff;
}

.badge-primary {
    background: #660000;
    color: #ff0000;
}

.badge-success {
    background: #003300;
    color: #00ff00;
}

.badge-warning {
    background: #663300;
    color: #ff9900;
}

.badge-danger {
    background: #660000;
    color: #ff0000;
}

.badge-progress-pending {
    background: #660000;
    color: #ffff00;
}

.badge-progress-done {
    background: #333;
    color: #ff0000;
}

.badge-progress-delivered {
    background: #666600;
    color: #00ff00;
}

.badge-progress-settled {
    background: #444;
    color: #ffffff;
}

.actions {
    display: flex;
    gap: 5px;
    align-items: center;
    white-space: nowrap;
    vertical-align: bottom;
}

table td.actions {
    vertical-align: bottom;
    padding-top: 10px;
    padding-bottom: 18px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ff0000;
    color: #00ff00;
}

.back-link {
    display: inline-block;
    margin-bottom: 15px;
    color: #ff0000;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .nav {
        overflow-x: auto;
    }
    
    table {
        font-size: 12px;
    }
    
    table th, table td {
        padding: 8px;
    }
}

.lunar-info {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
    padding: 5px;
    background: #1a1a1a;
    border-radius: 3px;
}

.image-upload-area {
    border: 2px dashed #333;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #1a1a1a;
}

.image-upload-area:hover {
    border-color: #00ff00;
    background: #0a1a0a;
}

.file-upload-area {
    border: 2px dashed #333;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #1a1a1a;
}

.file-upload-area:hover {
    border-color: #00ff00;
    background: #0a1a0a;
}

.upload-tip {
    color: #888;
    font-size: 13px;
    line-height: 1.8;
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.image-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.image-item .remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(255,0,0,0.8);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    cursor: pointer;
    font-size: 14px;
}

.epitaph-preview {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 15px;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    color: #ffffff;
    min-height: 60px;
}

.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #1a1a1a;
    border-radius: 4px;
    border: 1px solid #333;
}

.file-item .remove-btn {
    cursor: pointer;
    color: #888;
    font-size: 18px;
}

.file-item .remove-btn:hover {
    color: #ff0000;
}

.list-images {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 120px;
    position: relative;
    z-index: 1;
    overflow: visible;
    align-items: center;
}

.list-images a {
    display: inline-block;
    position: relative;
}

.list-images img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ddd;
    display: block;
    transition: all 0.3s ease;
}

.list-images a {
    display: block;
}

.list-images a:hover {
    z-index: 1001;
    position: relative;
}

table td {
    overflow: visible !important;
    position: static !important;
}

h2 {
    color: #00ff00;
}

/* ========== 已删除侧边栏样式，仅保留顶部导航栏 ========== */
/* 侧边栏相关样式已废弃 - 2026-03-13 */
/* .menu-toggle, .sidebar, .sidebar-overlay 等样式不再使用 */
