/* ==========================================
   PLAN HISTORY PATH
   ========================================== */
.action-plan-history-path {
    margin: 10px auto;
    text-align: center;
    overflow: hidden;
}

.action-plan-history-title {
    font-weight: bold;
    margin-bottom: 8px;
    letter-spacing: 0.4px;
}

.action-plan-history-steps {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0;
    scroll-behavior: smooth;
}

/* Scrollbar styling for webkit browsers */
.action-plan-history-steps::-webkit-scrollbar {
    height: 8px;
}

.action-plan-history-steps::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.action-plan-history-steps::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.action-plan-history-steps::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.action-plan-history-step {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 120px;
    padding: 8px 16px;
    border: 2px solid rgba(0,0,0,0.25);
    border-radius: 6px;
    color: #000;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-plan-history-step:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    text-decoration: none;
}

.action-plan-history-step .step-level {
    font-size: 0.95em;
}

.action-plan-history-step .step-meta {
    font-size: 0.8em;
    font-weight: normal;
}

.action-plan-history-step .step-date {
    font-size: 0.8em;
    font-weight: normal;
    margin-top: 4px;
}

.action-plan-history-step .step-current-label {
    margin-top: 6px;
    font-size: 0.75em;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.action-plan-history-step.is-current {
    border-color: rgba(0,0,0,0.5);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.2);
}

.action-plan-history-arrow {
    font-size: 2rem;
    color: #555555;
    line-height: 1;
    padding: 0 4px;
}

/* ==========================================
   CURRENT PLAN (Modern Refreshed)
   ========================================== */
.ap-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    margin-bottom: 24px;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow: hidden;
    max-width: 100%;
}
.ap-card.inactive {
    border-style: dashed;
    /* Background remains default for better readability */
}

.ap-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.ap-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ap-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ap-id-badge {
    font-size: 0.75rem;
    background: rgba(0,0,0,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    color: inherit;
    opacity: 0.7;
}

.ap-status-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 9999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ap-status-badge.inactive { background: #e2e8f0; color: #4a5568; }

.ap-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.ap-meta-item { display: flex; flex-direction: column; gap: 2px; }
.ap-meta-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: #718096; letter-spacing: 0.05em; }
.ap-meta-value { font-size: 0.95rem; font-weight: 500; color: #2d3748; }

.ap-body { padding: 24px; }
.ap-section { margin-bottom: 32px; }
.ap-section:last-child { margin-bottom: 0; }

.ap-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #4a5568;
    margin-bottom: 12px;
    letter-spacing: 0.025em;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 6px;
    display: inline-block;
}

.ap-summary-content {
    line-height: 1.4; /* Increased line height for better readability */
    font-size: 0.9rem; /* Slightly increased font size */
    color: #4a5568;
}

.ap-table-wrapper {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.ap-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.ap-table th {
    background: #f7fafc;
    text-align: left;
    padding: 10px 16px;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.8rem;
    text-transform: uppercase;
}
.ap-table td { padding: 12px 16px; border-bottom: 1px solid #e2e8f0; color: #2d3748; vertical-align: top; }
.ap-table tr:last-child td { border-bottom: none; }

.ap-check-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.ap-check-yes { background: #c6f6d5; color: #22543d; }
.ap-check-no { background: #fed7d7; color: #742a2a; }
.ap-check-pending { background: #edf2f7; color: #718096; }

.ap-footer {
    text-align: center;
    padding: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    border-top: 1px solid #e2e8f0;
}
.ap-footer.request-pending { background: #feebc8; color: #744210; }
.ap-footer.scheduled { background: #fffff0; color: #975a16; }
.ap-footer.due-today { background: #ebf8ff; color: #2b6cb0; }
.ap-footer.overdue { background: #fff5f5; color: #c53030; }

.ap-no-reviews { color: #a0aec0; font-style: italic; text-align: center; padding: 16px; }

/* ==========================================
   CREATE PLAN SECTION
   ========================================== */
.action-plan-level-change {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 0.4rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.action-plan-level-change-title {
    font-size: 15px;
    font-weight: bold;
}

.action-plan-level-change-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-plan-level-change-label {
    margin: 0;
    white-space: nowrap;
    font-weight: bold;
}

.action-plan-create-title {
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}
