.edition-timeline {
    position: relative;
    padding: 0;
}

.timeline-entry {
    display: flex;
    position: relative;
    margin-bottom: 0;
}

.timeline-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30px;
    flex-shrink: 0;
    padding-top: 18px;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid #ccc;
    background: #fff;
    z-index: 1;
    flex-shrink: 0;
}

.dot-created {
    border-color: #28a745;
    background: #28a745;
}

.dot-edited {
    border-color: #007bff;
    background: #007bff;
}

.dot-deleted {
    border-color: #dc3545;
    background: #dc3545;
}

.timeline-line {
    width: 2px;
    flex-grow: 1;
    background: #dee2e6;
    min-height: 20px;
}

.timeline-content {
    flex: 1;
    padding: 0 0 16px 12px;
    min-width: 0;
}

.timeline-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.timeline-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.timeline-card.expanded {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.timeline-header:hover {
    background: #f8f9fa;
}

.timeline-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.timeline-header-right {
    flex-shrink: 0;
}

.expand-icon {
    font-size: 1.4rem;
    color: #6c757d;
    transition: transform 0.2s ease;
}

.action-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-created {
    background: #d4edda;
    color: #155724;
}

.badge-edited {
    background: #cce5ff;
    color: #004085;
}

.badge-deleted {
    background: #f8d7da;
    color: #721c24;
}

.badge-current {
    background: #e2e3e5;
    color: #383d41;
}

.timeline-date {
    font-size: 0.85rem;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.timeline-user {
    font-size: 0.85rem;
    color: #495057;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.diff-hint {
    font-size: 0.75rem;
    color: #6f42c1;
    background: #f3e8ff;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 500;
}

.diff-hint-none {
    font-size: 0.75rem;
    color: #6c757d;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 500;
}

.timeline-body {
    border-top: 1px solid #e9ecef;
    padding: 0;
    background: #fdfdfe;
}

.current-state-card {
    border: 2px solid #e2e3e5;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.current-state-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    background: #f8f9fa;
    transition: background 0.15s ease;
}

.current-state-header:hover {
    background: #e9ecef;
}

.current-state-body {
    border-top: 1px solid #e2e3e5;
    padding: 16px;
}

.diff-section {
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
}

.diff-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.diff-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.diff-field {
    padding: 10px 12px;
    border-radius: 6px;
    border-left: 4px solid transparent;
}

.diff-modified {
    background: #fff8e1;
    border-left-color: #ffc107;
}

.diff-added {
    background: #e8f5e9;
    border-left-color: #28a745;
}

.diff-removed {
    background: #fce4ec;
    border-left-color: #dc3545;
}

.diff-values {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.diff-old {
    flex: 1;
    min-width: 200px;
    padding: 8px 10px;
    background: rgba(220, 53, 69, 0.06);
    border: 1px solid rgba(220, 53, 69, 0.15);
    border-radius: 4px;
}

.diff-new {
    flex: 1;
    min-width: 200px;
    padding: 8px 10px;
    background: rgba(40, 167, 69, 0.06);
    border: 1px solid rgba(40, 167, 69, 0.15);
    border-radius: 4px;
}

.diff-arrow {
    display: flex;
    align-items: center;
    color: #6c757d;
    font-size: 1.2rem;
    padding-top: 6px;
    flex-shrink: 0;
}

.diff-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: 3px;
    margin-bottom: 4px;
}

.diff-tag-old {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

.diff-tag-new {
    background: rgba(40, 167, 69, 0.12);
    color: #28a745;
}

.diff-tag-added {
    background: rgba(40, 167, 69, 0.12);
    color: #28a745;
}

.diff-tag-removed {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

.snapshot-section {
    border-top: 1px solid #e9ecef;
}

.snapshot-section-title {
    padding: 10px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    transition: background 0.15s ease;
}

.snapshot-section-title:hover {
    background: #f0f0f0;
}

.snapshot-expand-icon {
    font-size: 1rem;
    margin-left: auto;
}

.snapshot-detail {
    padding: 0 16px 16px;
}

.snapshot-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.snapshot-field {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 4px;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 3px;
}

.snapshot-field:last-child {
    border-bottom: none;
}

.field-highlight-modified {
    background: #fff8e1;
}

.field-highlight-added {
    background: #e8f5e9;
}

.field-highlight-removed {
    background: #fce4ec;
}

.field-label {
    font-weight: 600;
    color: #495057;
    min-width: 160px;
    font-size: 0.85rem;
    text-transform: capitalize;
}

.field-value {
    color: #212529;
    font-size: 0.85rem;
    flex: 1;
    min-width: 0;
}

.field-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.list-item-card {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    background: #e9ecef;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
}

.list-item-field {
    white-space: nowrap;
}

.list-item-simple {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.snapshot-json {
    display: block;
    background: #f4f4f4;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    word-break: break-all;
}

.snapshot-raw {
    background: #f4f4f4;
    padding: 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}

.badge-element-type {
    display: inline-block;
    background: #f8d7da;
    color: #721c24;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}
