/* ──────────────────────────────────────────────
   Plan View — Project tree table styles
   ────────────────────────────────────────────── */

.plan-full-page {
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Header */
.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-shrink: 0;
}
.plan-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.plan-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.plan-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}
.plan-progress-bar {
    display: inline-block;
}

/* Body */
.plan-body {
    flex: 1;
    overflow: auto;
}
.plan-loading,
.plan-error,
.plan-empty {
    padding: 40px;
    text-align: center;
    color: #888;
    font-size: 14px;
}
.plan-error .text-danger {
    margin-right: 8px;
}

/* Table */
.plan-table-wrapper {
    overflow-x: auto;
}
.plan-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.plan-table thead th {
    background: #f7f7f7;
    border-bottom: 2px solid #ddd;
    padding: 8px 10px;
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}
.plan-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background 0.1s;
    cursor: pointer;
}
.plan-table tbody tr:hover {
    background: #f5f8ff;
}
.plan-table td {
    padding: 6px 10px;
    vertical-align: middle;
}

/* Column widths */
.plan-col-name { min-width: 280px; }
.plan-col-type { width: 120px; white-space: nowrap; }
.plan-col-status { width: 110px; white-space: nowrap; }
.plan-col-indicators { width: 130px; white-space: nowrap; font-size: 12px; }
.plan-col-assignee { width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-col-dates { width: 180px; white-space: nowrap; font-size: 12px; color: #666; }
.plan-col-duration { width: 50px; white-space: nowrap; font-size: 12px; color: #666; text-align: center; }
.plan-col-progress { width: 100px; position: relative; }

/* P8 indicators */
.plan-ind {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-right: 6px;
}
.plan-ind small {
    font-size: 11px;
    color: #666;
}

/* Name cell with indent */
.plan-name-cell {
    display: flex;
    align-items: center;
    gap: 4px;
}
.plan-name-cell .plan-record-link {
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Toggle caret */
.plan-toggle {
    cursor: pointer;
    width: 14px;
    text-align: center;
    color: #999;
    flex-shrink: 0;
}
.plan-toggle:hover {
    color: #333;
}
.plan-toggle-spacer {
    display: inline-block;
    width: 14px;
    flex-shrink: 0;
}

/* Mission rows */
.plan-row-mission {
    background: #fafafa;
    font-weight: 600;
}
.plan-row-mission .plan-name-cell .plan-record-link {
    font-weight: 600;
}

/* Milestone icon */
.plan-milestone-icon {
    font-size: 10px;
}

/* Progress bar (inline mini) */
.plan-progress {
    height: 14px;
    margin: 0;
    border-radius: 3px;
    background: #eee;
    font-size: 10px;
    line-height: 14px;
}
.plan-progress .progress-bar {
    font-size: 10px;
    line-height: 14px;
}

/* ──────────────────────────────────────────────
   Mission Planner Nav Panel (CProject bottom)
   ────────────────────────────────────────────── */

.mission-planner-nav-panel {
    padding: 8px 0;
}
.mp-stats {
    display: flex;
    align-items: center;
    gap: 20px;
}
.mp-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.mp-stat-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mp-stat-value {
    font-size: 14px;
    font-weight: 600;
}

/* ──────────────────────────────────────────────
   MP Split View (Plan + Gantt shared)
   Reuses .split-container / .left-panel / .right-panel / .panel-resizer
   from list-with-modes.css
   ────────────────────────────────────────────── */

.mp-split {
    margin-top: 0;
}
.mp-split .mp-left-panel {
    width: 55%;
    min-width: 350px;
    overflow: auto;
}
.mp-split .mp-right-panel {
    min-width: 300px;
}

/* Selected row highlight */
.plan-row-selected {
    background: #dbeafe !important;
    border-left: 3px solid #3b82f6;
}
.plan-row-selected td:first-child {
    padding-left: 7px;
}

/* Record link in plan — cursor pointer */
.plan-record-link {
    cursor: pointer;
}

/* Detail panel states */
.mp-detail-placeholder,
.mp-detail-loading,
.mp-detail-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-size: 14px;
    gap: 8px;
}
.mp-detail-loading .fa-spinner {
    font-size: 18px;
    color: #666;
}

/* Gap badge between tasks — positioned on the td (not tr) for cross-browser reliability */
.plan-row-has-gap .plan-col-progress {
    position: relative;
    overflow: visible;
}
.plan-gap-badge {
    position: absolute;
    bottom: -8px;
    right: 4px;
    font-size: 10px;
    color: #888;
    background: #fff;
    padding: 0 5px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    line-height: 14px;
    z-index: 10;
    white-space: nowrap;
    pointer-events: none;
}
.plan-gap-overlap {
    color: #e65100;
    border-color: #ffcc80;
    background: #fff8e1;
}

/* Late task — dates in red */
.plan-row-late .plan-col-dates {
    color: #e53935;
    font-weight: 600;
}
