
/* Legacy timeline (approval-card-two) */
.side-route{
    font-size: 15px;
    padding-right: 18px
}

.timeline {
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
}

.timeline:before {
    content: '' !important;
    position: absolute !important;
    top: 5px !important;
    bottom: 5px !important;
    width: 5px !important;
    background: #2d353c !important;
    left: 25% !important;
    margin-left: -2.5px !important;
}

.timeline>li {
    position: relative !important;
    min-height: 50px !important;
    padding: 20px 0 !important;
}

.timeline .timeline-time {
    position: absolute !important;
    left: 0 !important;
    width: 22% !important;
    text-align: right !important;
    top: 30px
}

.timeline .timeline-time .date,
.timeline .timeline-time .time {
    display: block !important;
    font-weight: 600 !important;
}

.timeline .timeline-time .date {
    line-height: 16px !important;
    font-size: 12px !important;
}

.timeline .timeline-time .time {
    line-height: 24px !important;
    font-size: 20px !important;
    color: #242a30 !important;
}

.timeline .timeline-icon {
    left: 20% !important;
    position: absolute !important;
    width: 10% !important;
    text-align: center !important;
    top: 40px !important;
}

.timeline .timeline-icon a {
    text-decoration: none !important;
    width: 20px !important;
    height: 20px !important;
    display: inline-block !important;
    border-radius: 20px !important;
    background: #d9e0e7 !important;
    line-height: 10px !important;
    color: #fff !important;
    font-size: 14px !important;
    border: 5px solid #2d353c !important;
    transition: border-color .2s linear
}

.timeline .timeline-body {
    margin-left: 28% !important;
    margin-right: 5% !important;
    background: #fff !important;
    position: relative !important;
    padding: 20px 25px !important;
    border-radius: 6px !important;
}

.timeline .timeline-body:before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    border: 10px solid transparent !important;
    border-right-color: #fff !important;
    left: -20px !important;
    top: 20px !important;
}

.timeline .timeline-body>div+div {
    margin-top: 15px !important;
}

.timeline-header {
    padding-bottom: 10px !important;
    border-bottom: 1px solid #e2e7eb !important;
    line-height: 30px !important;
}

.timeline-header .username {
    font-size: 16px !important;
    font-weight: 600 !important;
}

.timeline-content {
    letter-spacing: .25px !important;
    line-height: 18px !important;
    font-size: 13px !important;
}

.timeline-comment-box {
    background: #f2f3f4 !important;
    margin-left: -25px !important;
    margin-right: -25px !important;
    padding: 20px 25px !important;
}

/* Approval workflow panel (x-approval-card) */
.approval-workflow-card .card-body {
    overflow: hidden;
}

.approval-workflow-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: stretch;
    background: #fff;
    border: none;
    border-radius: 0;
    overflow: hidden;
}

.approval-workflow-panel__history {
    flex: 1 1 58%;
    min-width: 280px;
    padding: 1.25rem 1.5rem;
    border-right: 1px solid #eceef1;
}

.approval-workflow-panel__actions {
    flex: 1 1 38%;
    min-width: 260px;
    padding: 1.25rem 1.5rem;
    background: #fafbfc;
    display: flex;
    flex-direction: column;
}

.approval-workflow-timeline {
    position: relative;
    margin: 0;
    padding: 0 0 0 3.25rem;
}

.approval-workflow-timeline::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: #e8eaed;
    border-radius: 1px;
}

.approval-workflow-step {
    position: relative;
    display: block;
    padding: 1.125rem 0;
    border-bottom: 1px solid #eef0f2;
}

.approval-workflow-step:last-child {
    border-bottom: none;
    padding-bottom: 0.25rem;
}

.approval-workflow-step:first-child {
    padding-top: 0.25rem;
}

.approval-workflow-step__marker {
    position: absolute;
    left: -3.25rem;
    top: 1.125rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.approval-workflow-step:first-child .approval-workflow-step__marker {
    top: 0.25rem;
}

.approval-workflow-step__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
    background: #fff;
    box-shadow: 0 0 0 2px #fff;
}

.approval-workflow-step__content {
    min-height: 40px;
}

.approval-workflow-step__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.approval-workflow-step__title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.35;
    color: #1a1d21;
}

.approval-workflow-step__time {
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 400;
    color: #6b7280;
    white-space: nowrap;
}

.approval-workflow-step__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #374151;
    margin-bottom: 0.35rem;
}

.approval-workflow-step__avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.approval-workflow-step__comment {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #4b5563;
}

.approval-workflow-step__comment-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    flex-shrink: 0;
    margin-top: 1px;
}

.approval-workflow-step__comment-text--muted {
    color: #9ca3af;
    font-style: italic;
}

.approval-workflow-step__comment a {
    word-break: break-word;
    color: #2563eb;
}

/* Approved — green */
.approval-workflow-step--approved .approval-workflow-step__icon {
    background-color: #22c55e;
}

/* Current — amber */
.approval-workflow-step--current .approval-workflow-step__icon {
    background-color: #f59e0b;
}

/* Rejected — danger */
.approval-workflow-step--rejected .approval-workflow-step__icon {
    background-color: #ef4444;
}

.approval-workflow-step--rejected .approval-workflow-step__title {
    color: #b91c1c;
}

.approval-workflow-step--rejected .approval-workflow-step__meta,
.approval-workflow-step--rejected .approval-workflow-step__comment {
    color: #991b1b;
}

.approval-workflow-step--rejected .approval-workflow-step__time {
    color: #dc2626;
}

/* Upcoming — greyed out */
.approval-workflow-step--upcoming .approval-workflow-step__icon {
    background-color: #e5e7eb;
    color: #c4c9d0;
}

.approval-workflow-step--upcoming .approval-workflow-step__title,
.approval-workflow-step--upcoming .approval-workflow-step__time,
.approval-workflow-step--upcoming .approval-workflow-step__comment-text,
.approval-workflow-step--upcoming .approval-workflow-step__comment-text--muted {
    color: #c4c9d0;
}

.approval-workflow-step--upcoming .approval-workflow-step__comment-icon {
    color: #d1d5db;
}

/* Right panel — actions */
.approval-workflow-actions-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 1.25rem;
}

.approval-workflow-actions-card--muted {
    background: transparent;
    border-style: dashed;
}

.approval-workflow-actions-card__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #1a1d21;
}

.approval-workflow-actions-card__comment {
    resize: vertical;
    min-height: 120px;
    border-color: #e5e7eb;
    border-radius: 6px;
}

.approval-workflow-actions-card__comment:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 0.2rem rgba(245, 158, 11, 0.15);
}

.approval-workflow-actions-card .btn-success {
    background-color: #22c55e;
    border-color: #22c55e;
}

.approval-workflow-actions-card .btn-success:hover {
    background-color: #16a34a;
    border-color: #16a34a;
}

@media (max-width: 991.98px) {
    .approval-workflow-panel {
        flex-direction: column;
    }

    .approval-workflow-panel__history {
        border-right: none;
        border-bottom: 1px solid #eceef1;
    }

    .approval-workflow-panel__actions {
        min-width: 100%;
    }
}
