/* ========== PROJECTS RETROFIT — TIMELINE REDESIGN ========== */

.projects-page {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    animation: pageIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pageIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════
   LIST PAGE
   ══════════════════════════════════════════════════════════════ */

/* ── Hero banner ── */
.projects__hero {
    position: relative;
    background: var(--color-surface-raised);
    border-radius: var(--radius-xl);
    padding: var(--space-6) var(--space-8);
    box-shadow: var(--neu-raised);
    border: 1px solid var(--color-border-light);
}
.projects__hero-content { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap; }
.projects__hero-text h2 { font-size: 1.35rem; font-weight: 800; color: var(--color-text-primary); letter-spacing: -0.02em; }
.projects__hero-text p { color: var(--color-text-tertiary); font-size: var(--text-sm); margin-top: 2px; }
.projects__hero-stats { display: flex; gap: var(--space-6); }
.projects__hero-stat { text-align: center; padding: var(--space-2) var(--space-4); background: var(--color-bg-primary); border-radius: var(--radius-lg); box-shadow: var(--neu-inset-sm); min-width: 80px; }
.projects__hero-stat-value { font-size: 1.4rem; font-weight: 800; color: #93b5e1; line-height: 1; }
.projects__hero-stat-label { font-size: 9px; font-weight: 700; color: var(--color-text-tertiary); text-transform: uppercase; letter-spacing: 0.8px; margin-top: 4px; }

/* ── Toolbar ── */
.projects__toolbar { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.projects__search { flex: 1; min-width: 200px; max-width: 400px; position: relative; }
.projects__search-icon { position: absolute; left: var(--space-3); top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--color-text-placeholder); pointer-events: none; }
.projects__search:focus-within .projects__search-icon { color: var(--color-accent); }
.projects__search-input { width: 100%; height: 40px; padding: 0 var(--space-4) 0 var(--space-9); background: var(--color-surface-input); border: 1px solid var(--color-border-input); border-radius: var(--radius-lg); font-size: var(--text-sm); color: var(--color-text-primary); transition: all 200ms ease; }
.projects__search-input:focus { outline: none; border-color: var(--color-border-focus); box-shadow: 0 0 0 3px var(--color-focus-ring); }
.projects__filters { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* ── Card Grid ── */
.projects__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: var(--space-5); }

.project-card {
    background: var(--color-surface-raised); border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl); overflow: hidden;
    transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; flex-direction: column; box-shadow: var(--neu-raised-sm);
}
.project-card:hover { box-shadow: var(--neu-raised-lg); transform: translateY(-3px); border-color: rgba(147,181,225,0.3); }

.project-card__image { height: 150px; background-size: cover; background-position: center; background-color: var(--color-bg-tertiary); position: relative; overflow: hidden; }
.project-card__image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,0.5) 0%, transparent 60%); }
.project-card__image-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: var(--space-3) var(--space-4); z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; }
.project-card__category { background: rgba(255,255,255,0.15); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-full); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.2); text-transform: uppercase; letter-spacing: 0.5px; }
.project-card__zone-count { color: rgba(255,255,255,0.8); font-size: 10px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.project-card__body { padding: var(--space-4) var(--space-5) var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.project-card__title { font-size: var(--text-base); font-weight: 700; color: var(--color-text-primary); line-height: 1.3; }
.project-card__meta { font-size: var(--text-xs); color: var(--color-text-tertiary); display: flex; align-items: center; gap: var(--space-2); }
.project-card__meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--color-text-placeholder); }
.project-card__progress { display: flex; align-items: center; gap: var(--space-3); margin-top: auto; }
.project-card__progress-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--color-bg-tertiary); display: flex; overflow: hidden; }
.project-card__progress-seg { height: 100%; transition: width 500ms ease; }
.project-card__progress-seg--done { background: #8ec5aa; }
.project-card__progress-seg--validated { background: #b4a4d6; }
.project-card__progress-seg--active { background: #dfc090; }
.project-card__progress-text { font-size: var(--text-sm); font-weight: 800; color: #93b5e1; min-width: 36px; text-align: right; }
.project-card__footer { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; padding-top: var(--space-2); border-top: 1px solid var(--color-border-light); }
.project-card__badge { display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; color: var(--color-text-on-accent); padding: 3px 10px; border-radius: var(--radius-full); text-transform: uppercase; letter-spacing: 0.3px; }
.project-card__badge--outline { background: transparent !important; border: 1.5px solid; color: inherit !important; }
.project-card__date { font-size: var(--text-xs); color: var(--color-text-tertiary); margin-left: auto; display: flex; align-items: center; gap: 4px; }

/* Card link wrapper */
.project-card__link {
    display: flex; flex-direction: column; flex: 1;
    text-decoration: none !important; color: inherit !important;
}
.project-card__link:hover, .project-card__link:visited { text-decoration: none !important; color: inherit !important; }

/* Edit button on card */
.project-card__edit-btn {
    width: 28px; height: 28px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--color-bg-primary); box-shadow: var(--neu-raised-sm);
    color: var(--color-text-placeholder); display: flex; align-items: center; justify-content: center;
    margin-left: auto; transition: all 200ms ease; flex-shrink: 0;
}
.project-card__edit-btn:hover { box-shadow: var(--neu-raised); color: #93b5e1; transform: scale(1.1); }
.project-card__edit-btn:active { box-shadow: var(--neu-inset-sm); transform: scale(0.95); color: #7a9fd0; }


/* ══════════════════════════════════════════════════════════════
   DETAIL PAGE — Timeline-centered redesign
   ══════════════════════════════════════════════════════════════ */

/* ── Header ── */
.pdetail__header {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3);
    background: var(--color-surface-raised); border-radius: var(--radius-xl);
    padding: var(--space-4) var(--space-5); box-shadow: var(--neu-raised); border: 1px solid var(--color-border-light);
}
.pdetail__header-left { display: flex; align-items: center; gap: var(--space-3); }
.pdetail__header-right { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.pdetail__back {
    display: flex; align-items: center; justify-content: center; width: 36px; height: 36px;
    border-radius: var(--radius-lg); box-shadow: var(--neu-raised-sm); color: var(--color-text-secondary);
    text-decoration: none; background: var(--color-bg-primary); transition: all 200ms ease;
}
.pdetail__back:hover { box-shadow: var(--neu-raised); color: var(--color-text-primary); }
.pdetail__title { font-size: 1.15rem; font-weight: 800; color: var(--color-text-primary); margin: 0; }
.pdetail__subtitle { font-size: var(--text-xs); color: var(--color-text-tertiary); }
.pdetail__countdown {
    display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius-lg);
    font-family: var(--font-mono, monospace); font-size: var(--text-sm); font-weight: 800;
    background: var(--color-bg-primary); box-shadow: var(--neu-inset-sm); color: var(--color-text-primary);
}
.pdetail__countdown--overdue { color: var(--color-error); }
.pdetail__session {
    font-size: 10px; font-weight: 600; color: var(--color-text-placeholder);
    font-family: var(--font-mono, monospace); padding: 6px 12px;
    background: var(--color-bg-primary); box-shadow: var(--neu-inset-sm); border-radius: var(--radius-lg);
}
.pdetail__status-badge {
    font-size: 10px; font-weight: 700; color: #fff; padding: 5px 14px;
    border-radius: var(--radius-lg); box-shadow: var(--neu-raised-sm); text-transform: uppercase; letter-spacing: 0.3px;
}
.pdetail__priority-badge {
    font-size: 10px; font-weight: 700; padding: 5px 14px; border-radius: var(--radius-lg);
    box-shadow: var(--neu-raised-sm); background: var(--color-bg-primary); text-transform: uppercase; letter-spacing: 0.3px;
    border: 1.5px solid;
}

/* ── Schedule Health Banner ── */
.pdetail__health-banner {
    display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap;
    background: var(--color-surface-raised); border-radius: var(--radius-xl);
    padding: var(--space-4) var(--space-5); box-shadow: var(--neu-raised); border: 1px solid var(--color-border-light);
}
.pdetail__health-score { display: flex; align-items: center; gap: var(--space-3); }
.pdetail__health-gauge { position: relative; width: 56px; height: 56px; flex-shrink: 0; }
.pdetail__health-gauge-text {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 900; color: var(--color-text-primary);
}
.pdetail__health-title { font-size: var(--text-sm); font-weight: 700; color: var(--color-text-primary); }
.pdetail__health-sub { font-size: var(--text-xs); color: var(--color-text-tertiary); }

.pdetail__health-pills { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.pdetail__health-pill {
    display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600;
    padding: 5px 12px; border-radius: var(--radius-full); box-shadow: var(--neu-raised-sm);
    border: 1px solid var(--color-border-light); background: var(--color-bg-primary);
}
.pdetail__health-pill--ontime { color: #3d6b52; border-color: rgba(74,158,116,0.3); }
.pdetail__health-pill--atrisk { color: #7a5c24; border-color: rgba(184,137,58,0.3); }
.pdetail__health-pill--late { color: #8b3a3a; border-color: rgba(196,107,107,0.3); }

.pdetail__health-kpis { display: flex; gap: var(--space-3); margin-left: auto; }
.pdetail__health-kpi {
    text-align: center; padding: var(--space-2) var(--space-3);
    background: var(--color-bg-primary); border-radius: var(--radius-lg); box-shadow: var(--neu-inset-sm); min-width: 70px;
}
.pdetail__health-kpi-val { font-size: 1.1rem; font-weight: 800; color: var(--color-text-primary); display: block; line-height: 1.2; }
.pdetail__health-kpi-label { font-size: 9px; font-weight: 700; color: var(--color-text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; }

/* ══════════════════════════════════════════════════════════════
   HORIZONTAL TIMELINE
   ══════════════════════════════════════════════════════════════ */
.pdetail__timeline-section {
    position: relative;
    background: var(--color-surface-raised); border-radius: var(--radius-xl);
    box-shadow: var(--neu-raised); border: 1px solid var(--color-border-light);
    padding: var(--space-4) 0;
    overflow: hidden;
}
.pdetail__timeline-header {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
    padding: 0 var(--space-5) var(--space-3); flex-wrap: wrap;
}
.pdetail__timeline-title {
    font-size: var(--text-sm); font-weight: 700; color: var(--color-text-primary);
    display: flex; align-items: center; gap: var(--space-2); margin: 0;
}
.pdetail__timeline-legend { display: flex; gap: var(--space-4); }
.pdetail__tl-leg { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--color-text-tertiary); font-weight: 500; }
.pdetail__tl-leg-dot { width: 8px; height: 8px; border-radius: 50%; }

.pdetail__timeline-scroll {
    overflow-x: auto; overflow-y: visible;
    scroll-behavior: smooth;
    padding: var(--space-4) var(--space-8);
    scrollbar-width: thin; scrollbar-color: var(--color-bg-tertiary) transparent;
    -webkit-overflow-scrolling: touch;
}
.pdetail__timeline-scroll::-webkit-scrollbar { height: 4px; }
.pdetail__timeline-scroll::-webkit-scrollbar-track { background: transparent; }
.pdetail__timeline-scroll::-webkit-scrollbar-thumb { background: var(--color-border-light); border-radius: 2px; }

.pdetail__timeline-track {
    display: flex; align-items: flex-start; gap: 0;
    position: relative; min-width: max-content;
    padding: var(--space-4) 0 var(--space-2);
}

/* Connector line */
.pdetail__timeline-track::before {
    content: ''; position: absolute; top: 56px; left: 24px; right: 24px;
    height: 3px; background: var(--color-border-light); border-radius: 2px; z-index: 0;
}

/* ── Timeline node ── */
.pdetail__tl-node {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    min-width: 100px; padding: 0 var(--space-2); cursor: pointer;
    position: relative; z-index: 1;
    transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pdetail__tl-node:hover { transform: translateY(-3px); }
.pdetail__tl-node.is-active { transform: translateY(-5px); }

.pdetail__tl-date {
    font-size: 10px; font-weight: 600; color: var(--color-text-placeholder);
    font-family: var(--font-mono, monospace); white-space: nowrap;
}

.pdetail__tl-dot {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--neu-raised-sm); border: 3px solid var(--color-surface-raised);
    position: relative; transition: all 250ms ease;
    z-index: 2;
}
.pdetail__tl-node:hover .pdetail__tl-dot { box-shadow: var(--neu-raised-lg); transform: scale(1.15); }
.pdetail__tl-node.is-active .pdetail__tl-dot {
    box-shadow: 0 0 0 6px rgba(147,181,225,0.25), var(--neu-raised); transform: scale(1.2);
    border-color: rgba(147,181,225,0.5);
}

.pdetail__tl-dot-num { font-size: 14px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.pdetail__tl-dot-pulse {
    position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #dfc090;
    animation: tl-pulse 2s infinite;
}
@keyframes tl-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0; transform: scale(1.4); }
}

.pdetail__tl-health { min-height: 16px; display: flex; align-items: center; }

.pdetail__tl-info {
    display: flex; flex-direction: column; align-items: center; gap: 2px; max-width: 110px;
}
.pdetail__tl-zone {
    font-size: 13px; font-weight: 700; color: var(--color-text-primary); text-align: center;
    line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.pdetail__tl-status { font-size: 11px; font-weight: 600; }
.pdetail__tl-tech { font-size: 10px; color: var(--color-text-placeholder); }

.pdetail__tl-health-tag {
    font-size: 8px; font-weight: 700; padding: 1px 6px; border-radius: var(--radius-full);
    text-transform: uppercase; letter-spacing: 0.3px;
}
.pdetail__tl-health-tag--ontime { background: rgba(74,158,116,0.12); color: #3d6b52; }
.pdetail__tl-health-tag--atrisk { background: rgba(184,137,58,0.12); color: #7a5c24; }
.pdetail__tl-health-tag--late { background: rgba(196,107,107,0.12); color: #8b3a3a; }
.pdetail__tl-health-tag--neutral { display: none; }

/* Today marker */
.pdetail__tl-today {
    position: absolute; top: 0; bottom: 0; z-index: 3; pointer-events: none;
    left: 50%; transform: translateX(-50%); display: none;
}
.pdetail__tl-today-line {
    position: absolute; top: 40px; bottom: 0; left: 50%; width: 2px;
    background: linear-gradient(180deg, #c46b6b, transparent); transform: translateX(-50%);
}
.pdetail__tl-today-label {
    position: absolute; top: 28px; left: 50%; transform: translateX(-50%);
    font-size: 8px; font-weight: 700; color: #c46b6b; text-transform: uppercase; letter-spacing: 0.5px;
    white-space: nowrap; background: var(--color-surface-raised); padding: 1px 6px; border-radius: var(--radius-sm);
}

/* Scroll arrows */
.pdetail__tl-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
    width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--color-surface-raised); box-shadow: var(--neu-raised);
    color: var(--color-text-secondary); display: flex; align-items: center; justify-content: center;
    transition: all 200ms ease;
}
.pdetail__tl-arrow:hover { box-shadow: var(--neu-raised-lg); color: var(--color-text-primary); }
.pdetail__tl-arrow--left { left: var(--space-2); }
.pdetail__tl-arrow--right { right: var(--space-2); }

/* ── Progress bar (detail) ── */
.pdetail__progress-section {
    background: var(--color-surface-raised); border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-5); box-shadow: var(--neu-raised-sm); border: 1px solid var(--color-border-light);
}
.pdetail__progress-bar {
    display: flex; height: 8px; border-radius: 4px; overflow: hidden;
    background: var(--color-bg-tertiary); box-shadow: var(--neu-inset-sm);
}
.pdetail__progress-seg { flex: 1; transition: background 400ms ease; }
.pdetail__progress-seg--todo { background: transparent; }
.pdetail__progress-seg--in_progress { background: #dfc090; }
.pdetail__progress-seg--done { background: #8ec5aa; }
.pdetail__progress-seg--validated { background: #b4a4d6; }

.pdetail__progress-labels {
    display: flex; justify-content: space-between; padding-top: var(--space-2);
    font-size: var(--text-xs); color: var(--color-text-tertiary); font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════
   CADENCE CHART
   ══════════════════════════════════════════════════════════════ */
.pdetail__cadence-section {
    background: var(--color-surface-raised); border-radius: var(--radius-xl);
    padding: var(--space-4) var(--space-5); box-shadow: var(--neu-raised); border: 1px solid var(--color-border-light);
}
.pdetail__section-title {
    font-size: var(--text-sm); font-weight: 700; color: var(--color-text-primary);
    display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-3);
}

/* SVG Burn-up chart */
.pdetail__cadence-svg-wrap {
    position: relative;
}
.pdetail__cadence-gap {
    display: flex; align-items: center; gap: 6px;
    position: absolute; top: 0; right: 0;
    font-size: 12px; font-weight: 700;
    padding: 4px 12px; border-radius: var(--radius-full);
    background: var(--color-bg-primary); box-shadow: var(--neu-raised-sm);
    z-index: 2;
}
.pdetail__cadence-svg {
    width: 100%; height: auto; max-height: 200px;
}

.pdetail__cadence-legend {
    display: flex; gap: var(--space-5); justify-content: center; padding-top: var(--space-3);
}
.pdetail__cadence-leg-item {
    display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--color-text-tertiary); font-weight: 500;
}
.pdetail__cadence-leg-line {
    width: 18px; height: 0; border-top: 2.5px solid; border-radius: 1px;
}

/* ── Mini progress bar (timeline nodes) ── */
.pdetail__tl-mini-bar {
    width: 60px; height: 4px; border-radius: 2px; background: var(--color-bg-tertiary);
    overflow: hidden;
}
.pdetail__tl-mini-fill { height: 100%; border-radius: 2px; transition: width 500ms ease; }
.pdetail__tl-pct { font-size: 11px; font-weight: 700; color: var(--color-text-tertiary); }

/* ══════════════════════════════════════════════════════════════
   MATRIX: Units x Operations
   ══════════════════════════════════════════════════════════════ */
.pdetail__matrix-section {
    background: var(--color-surface-raised); border-radius: var(--radius-xl);
    padding: var(--space-4) var(--space-5); box-shadow: var(--neu-raised); border: 1px solid var(--color-border-light);
}
.pdetail__matrix-scroll {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; scrollbar-color: var(--color-bg-tertiary) transparent;
}
.pdetail__matrix {
    border-collapse: separate; border-spacing: 3px;
}
.pdetail__matrix th, .pdetail__matrix td {
    padding: 0; text-align: center; vertical-align: middle;
}
.pdetail__matrix thead,
.pdetail__matrix tbody {
    background: var(--color-surface-raised);
}
.pdetail__matrix-corner {
    font-size: 10px; font-weight: 700; color: var(--color-text-tertiary);
    text-transform: uppercase; letter-spacing: 0.5px; text-align: left;
    padding: var(--space-2) var(--space-3) !important; min-width: 100px;
    position: sticky; left: 0; z-index: 2; background: var(--color-surface-raised);
}
.pdetail__matrix-zone {
    font-size: 12px; font-weight: 700; color: var(--color-text-tertiary);
    text-transform: uppercase; letter-spacing: 0.3px;
    padding: var(--space-1) !important;
    white-space: nowrap; height: 120px;
    position: relative; vertical-align: bottom;
    background: var(--color-surface-raised);
}
.pdetail__matrix-zone > span {
    display: inline-block;
    writing-mode: vertical-lr; transform: rotate(180deg);
    max-height: 110px; overflow: hidden; text-overflow: ellipsis;
    line-height: 1.2;
}
.pdetail__matrix-zone--total {
    color: var(--color-text-primary); font-weight: 800;
}
.pdetail__matrix-row { cursor: pointer; background: var(--color-surface-raised); }
.pdetail__matrix-row:hover .pdetail__matrix-unit {
    background: var(--color-bg-hover);
}

.pdetail__matrix-unit {
    display: flex; align-items: center; gap: var(--space-2);
    padding: var(--space-2) var(--space-3) !important; text-align: left;
    position: sticky; left: 0; z-index: 1;
    min-width: 100px; border-radius: var(--radius-sm);
    background: var(--color-surface-raised);
}
.pdetail__matrix-unit-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pdetail__matrix-unit-name { font-size: 13px; font-weight: 700; color: var(--color-text-primary); white-space: nowrap; }

.pdetail__matrix-cell {
    width: 44px; height: 44px; border-radius: var(--radius-md); cursor: pointer;
    transition: all 200ms ease; position: relative;
}
.pdetail__matrix-cell:hover { transform: scale(1.15); z-index: 3; filter: brightness(0.9); }

.pdetail__matrix-cell--todo { background: var(--color-bg-tertiary); border: 1px solid var(--color-border-light); }
.pdetail__matrix-cell--todo:hover { filter: brightness(0.85); }
.pdetail__matrix-cell--in_progress { background: linear-gradient(135deg, #dfc090, #d1ad78); }
.pdetail__matrix-cell--done { background: linear-gradient(135deg, #8ec5aa, #79b598); }
.pdetail__matrix-cell--validated { background: linear-gradient(135deg, #b4a4d6, #a08ec8); }
.pdetail__matrix-cell--empty { background: transparent; width: 44px; height: 44px; }

.pdetail__matrix-cell-inner {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
}
.pdetail__matrix-pct { font-size: 8px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }

.pdetail__matrix-total {
    font-size: 13px; font-weight: 800; color: var(--color-text-primary);
    padding: var(--space-2) var(--space-8) !important;
    background: var(--color-bg-primary); border-radius: var(--radius-sm); box-shadow: var(--neu-inset-sm);
    width: 1%; white-space: nowrap;
    position: sticky; right: 0; z-index: 1;
}
.pdetail__matrix-zone--total {
    width: 1%; white-space: nowrap;
    padding: var(--space-2) var(--space-8) !important;
    position: sticky; right: 0; z-index: 2;
    background: var(--color-surface-raised);
}

/* Group inside matrix */
.pdetail__matrix-group + .pdetail__matrix-group {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 2px dashed var(--color-border-light);
}
.pdetail__matrix-group-label {
    font-size: 13px; font-weight: 700; color: var(--color-text-primary);
    display: flex; align-items: center; gap: var(--space-2);
    margin-bottom: var(--space-2);
}
.pdetail__matrix-group-body {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; scrollbar-color: var(--color-bg-tertiary) transparent;
    scrollbar-gutter: stable;
    padding-top: 0;
}
.pdetail__matrix-group-body--scroll {
    max-height: 600px; overflow-y: auto;
}
.pdetail__matrix-group-body--scroll thead {
    position: sticky; top: 0; z-index: 4;
}
.pdetail__matrix-group-body--scroll .pdetail__matrix-corner,
.pdetail__matrix-group-body--scroll .pdetail__matrix-zone {
    background: var(--color-surface-raised);
}

/* Section count badge */
.pdetail__section-count {
    font-size: 11px; font-weight: 600; color: var(--color-text-tertiary);
    margin-left: auto; text-transform: none; letter-spacing: 0;
}

/* ══════════════════════════════════════════════════════════════
   UNIT SLIDE-UP CONTENT
   ══════════════════════════════════════════════════════════════ */
.pdetail__su-unit { display: flex; flex-direction: column; gap: var(--space-4); }
.pdetail__su-ops-title {
    font-size: 10px; font-weight: 700; color: var(--color-text-tertiary);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.pdetail__su-ops-list { display: flex; flex-direction: column; gap: var(--space-2); }
.pdetail__su-op {
    display: flex; align-items: center; gap: var(--space-3);
    padding: var(--space-2) var(--space-3); border-radius: var(--radius-lg);
    background: var(--color-bg-tertiary); border: 1px solid var(--color-border-light);
    cursor: pointer; transition: all 200ms ease;
}
.pdetail__su-op:hover { background: var(--color-bg-hover); box-shadow: var(--neu-raised-sm); }
.pdetail__su-op--done, .pdetail__su-op--validated { border-left: 3px solid #8ec5aa; }
.pdetail__su-op--in_progress { border-left: 3px solid #dfc090; }

.pdetail__su-op-num {
    width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 800; color: #fff;
}
.pdetail__su-op-info { flex: 1; min-width: 0; }
.pdetail__su-op-name { font-size: var(--text-sm); font-weight: 600; color: var(--color-text-primary); display: block; }
.pdetail__su-op-meta { font-size: 10px; color: var(--color-text-tertiary); display: block; }
.pdetail__su-op-right { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
.pdetail__su-op-badge {
    font-size: 9px; font-weight: 700; color: #fff; padding: 2px 8px;
    border-radius: var(--radius-full); text-transform: uppercase; letter-spacing: 0.3px;
}
.pdetail__su-op-hours { font-size: 10px; font-weight: 600; color: var(--color-text-tertiary); font-family: var(--font-mono, monospace); }
.pdetail__su-op-qual {
    font-size: 8px; font-weight: 700; padding: 2px 6px; border-radius: var(--radius-full);
    text-transform: uppercase; letter-spacing: 0.3px; border: 1px solid;
}
.pdetail__su-op-qual--ok { color: #3d6b52; background: rgba(142,197,170,0.15); border-color: rgba(74,158,116,0.25); }
.pdetail__su-op-qual--nok { color: #8b3a3a; background: rgba(232,160,160,0.15); border-color: rgba(196,107,107,0.25); }
.pdetail__su-op-qual--conditional { color: #7a5c24; background: rgba(223,192,144,0.15); border-color: rgba(184,137,58,0.25); }

/* ── Logs section ── */
.pdetail__logs-section {
    background: var(--color-surface-raised); border-radius: var(--radius-xl);
    padding: var(--space-4) var(--space-5); box-shadow: var(--neu-raised); border: 1px solid var(--color-border-light);
}

/* ══════════════════════════════════════════════════════════════
   SLIDING UP PANEL (Full-width bottom sheet)
   ══════════════════════════════════════════════════════════════ */
.pdetail__slideup-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0); pointer-events: none;
    transition: background 350ms ease;
}
.pdetail__slideup-overlay.is-open {
    background: rgba(0,0,0,0.35); pointer-events: auto;
    backdrop-filter: blur(2px);
}

.pdetail__slideup {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 1001;
    background: var(--color-surface-raised);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
    max-height: 80vh; overflow-y: auto;
    transform: translateY(100%);
    transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pdetail__slideup-overlay.is-open .pdetail__slideup {
    transform: translateY(0);
}

.pdetail__slideup-handle {
    display: flex; justify-content: center; padding: var(--space-3) 0 var(--space-1);
    cursor: grab;
}
.pdetail__slideup-handle-pill {
    width: 40px; height: 4px; border-radius: 2px; background: var(--color-border-light);
}

.pdetail__slideup-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 var(--space-6) var(--space-3);
    border-bottom: 1px solid var(--color-border-light);
}
.pdetail__slideup-title {
    font-size: 1rem; font-weight: 800; color: var(--color-text-primary);
}
.pdetail__slideup-close {
    width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--color-bg-primary); box-shadow: var(--neu-raised-sm);
    color: var(--color-text-secondary); display: flex; align-items: center; justify-content: center;
    transition: all 200ms ease;
}
.pdetail__slideup-close:hover { box-shadow: var(--neu-raised); color: var(--color-text-primary); }

.pdetail__slideup-body {
    padding: var(--space-5) var(--space-6);
}

/* SlideUp grid layout */
.pdetail__slideup-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6);
}

.pdetail__slideup-left, .pdetail__slideup-right {
    display: flex; flex-direction: column; gap: var(--space-4);
}

/* SlideUp KPIs */
.pdetail__slideup-kpis {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2);
}
.pdetail__su-kpi {
    text-align: center; padding: var(--space-3);
    background: var(--color-bg-primary); border-radius: var(--radius-lg);
    box-shadow: var(--neu-inset-sm); border: 1px solid var(--color-border-light);
}
.pdetail__su-kpi-label { font-size: 9px; font-weight: 700; color: var(--color-text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; display: block; }
.pdetail__su-kpi-val { font-size: var(--text-sm); font-weight: 800; color: var(--color-text-primary); display: block; margin-top: 2px; }
.pdetail__su-kpi-val--ontime { color: #3d6b52; }
.pdetail__su-kpi-val--atrisk { color: #7a5c24; }
.pdetail__su-kpi-val--late { color: #8b3a3a; }

/* SlideUp details */
.pdetail__su-details {
    display: flex; flex-direction: column; gap: var(--space-2);
}
.pdetail__su-detail-row {
    display: flex; align-items: center; gap: var(--space-2);
    font-size: var(--text-xs); color: var(--color-text-secondary);
    padding: var(--space-2) var(--space-3);
    background: var(--color-bg-tertiary); border-radius: var(--radius-md); border: 1px solid var(--color-border-light);
}
.pdetail__su-detail-row svg { flex-shrink: 0; color: var(--color-text-placeholder); }

.pdetail__su-notes {
    font-size: var(--text-xs); color: var(--color-text-secondary); line-height: 1.6;
    padding: var(--space-3); background: var(--color-bg-tertiary); border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
}

/* SlideUp logs */
.pdetail__su-logs-title, .pdetail__su-edit-title {
    font-size: 10px; font-weight: 700; color: var(--color-text-tertiary);
    text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-bottom: var(--space-2);
}

/* SlideUp form */
.pdetail__su-edit { display: flex; flex-direction: column; gap: var(--space-2); }
.pdetail__su-form { display: flex; flex-direction: column; gap: var(--space-2); }
.pdetail__su-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--space-2); }

/* ══════════════════════════════════════════════════════════════
   HOTSPOTS (reused from image viewer)
   ══════════════════════════════════════════════════════════════ */
.hotspot {
    position: absolute; width: 34px; height: 34px; border-radius: 50%;
    border: 2.5px solid rgba(255,255,255,0.85);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transform: translate(-50%, -50%);
    transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 4; box-shadow: var(--neu-raised-sm);
}
.hotspot__number { font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.hotspot__tooltip {
    position: absolute; bottom: calc(100% + 10px); left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--color-surface-raised); color: var(--color-text-primary); font-size: 11px; font-weight: 600;
    padding: 6px 14px; border-radius: var(--radius-md); white-space: nowrap;
    opacity: 0; pointer-events: none; transition: all 200ms ease;
    box-shadow: var(--neu-raised); border: 1px solid var(--color-border-light);
}
.hotspot__tooltip::after {
    content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    border: 5px solid transparent; border-top-color: var(--color-surface-raised);
}
.hotspot:hover .hotspot__tooltip { opacity: 1; transform: translateX(-50%) translateY(0); }
.hotspot:hover { transform: translate(-50%, -50%) scale(1.2); z-index: 10; box-shadow: var(--neu-raised-lg); }

.hotspot--todo { background: linear-gradient(135deg, #b0bec5, #90a4ae); }
.hotspot--in_progress { background: linear-gradient(135deg, #dfc090, #d1ad78); animation: hotspot-pulse 2.5s infinite; }
.hotspot--done { background: linear-gradient(135deg, #8ec5aa, #79b598); }
.hotspot--validated { background: linear-gradient(135deg, #b4a4d6, #a08ec8); }

.hotspot.is-active { transform: translate(-50%, -50%) scale(1.3); z-index: 10; border-color: #fff; box-shadow: 0 0 0 6px rgba(147,181,225,0.3), var(--neu-raised); }

@keyframes hotspot-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(223,192,144,0.5); }
    50% { box-shadow: 0 0 0 10px rgba(223,192,144,0); }
}

/* ══════════════════════════════════════════════════════════════
   ACTIVITY TIMELINE (logs)
   ══════════════════════════════════════════════════════════════ */
.step-timeline { display: flex; flex-direction: column; gap: 0; }
.step-timeline__item {
    display: flex; gap: var(--space-3); padding: var(--space-2) 0;
    border-left: 2px solid var(--color-border-light); margin-left: 11px;
    padding-left: var(--space-4); position: relative;
}
.step-timeline__item::before {
    content: ''; position: absolute; left: -5px; top: 12px;
    width: 8px; height: 8px; border-radius: 50%; background: var(--color-border);
}
.step-timeline__item--status_change::before { background: #93b5e1; }
.step-timeline__item--checkin::before { background: #8ec5aa; }
.step-timeline__item--checkout::before { background: #dfc090; }
.step-timeline__item--incident::before { background: #e8a0a0; }
.step-timeline__item--quality_check::before { background: #b4a4d6; }
.step-timeline__item--assignment::before { background: #93b5e1; }
.step-timeline__item--note::before { background: #b0bec5; }

.step-timeline__content { flex: 1; }
.step-timeline__text { font-size: var(--text-xs); color: var(--color-text-secondary); line-height: 1.4; }
.step-timeline__meta { font-size: 10px; color: var(--color-text-placeholder); margin-top: 2px; }

/* ══════════════════════════════════════════════════════════════
   KPI Cards (kept for compatibility — used in list page create)
   ══════════════════════════════════════════════════════════════ */
.kpi-card {
    background: var(--color-surface-raised);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    display: flex; flex-direction: column; gap: 2px;
    position: relative; overflow: hidden;
    box-shadow: var(--neu-raised-sm);
}
.kpi-card::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; }
.kpi-card--accent::before { background: #93b5e1; }
.kpi-card--success::before { background: #8ec5aa; }
.kpi-card--warning::before { background: #dfc090; }
.kpi-card--error::before { background: #e8a0a0; }
.kpi-card--info::before { background: #b4a4d6; }

.kpi-card__label { font-size: 10px; font-weight: 700; color: var(--color-text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; }
.kpi-card__value { font-size: 1.1rem; font-weight: 800; color: var(--color-text-primary); line-height: 1.2; }
.kpi-card__sub { font-size: var(--text-xs); color: var(--color-text-tertiary); font-weight: 500; }

/* Step badges */
.step-badge {
    display: inline-flex; align-items: center;
    font-size: 10px; font-weight: 700; letter-spacing: 0.2px;
    padding: 3px 10px; border-radius: var(--radius-full);
    box-shadow: var(--neu-raised-sm);
    border: 1px solid var(--color-border-light);
    background: var(--color-surface-raised);
    color: var(--color-text-secondary);
}
.step-badge--success { background: rgba(142,197,170,0.18); color: #2d7a50; border-color: rgba(74,158,116,0.25); }
.step-badge--warning { background: rgba(223,192,144,0.18); color: #7a5c24; border-color: rgba(184,137,58,0.25); }
.step-badge--error   { background: rgba(232,160,160,0.18); color: #8b3a3a; border-color: rgba(196,107,107,0.25); }
.step-badge--info    { background: rgba(147,181,225,0.18); color: #3a6290; border-color: rgba(91,140,191,0.25); }

/* ══════════════════════════════════════════════════════════════
   PROJECT CREATION FORM — Sections & Operation Builder
   ══════════════════════════════════════════════════════════════ */
.pf-section {
    background: var(--color-bg-primary); border-radius: var(--radius-lg);
    padding: var(--space-4); box-shadow: var(--neu-inset-sm);
    display: flex; flex-direction: column; gap: var(--space-3);
}
.pf-section--ops { gap: var(--space-2); }
.pf-section-title {
    font-size: 13px; font-weight: 700; color: var(--color-text-primary);
    display: flex; align-items: center; gap: var(--space-2);
    text-transform: uppercase; letter-spacing: 0.5px;
    padding-bottom: var(--space-2); border-bottom: 1px solid var(--color-border-light);
    margin-bottom: var(--space-1);
}
.pf-ops-count {
    font-size: 10px; font-weight: 800; color: #fff; background: #93b5e1;
    width: 22px; height: 22px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: auto; box-shadow: var(--neu-raised-sm);
}

/* ── Operations list ── */
.pf-ops-list {
    display: flex; flex-direction: column; gap: var(--space-2);
}

.pf-ops-empty {
    display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
    padding: var(--space-6) var(--space-4); color: var(--color-text-placeholder);
    text-align: center; font-size: var(--text-xs);
}

/* ── Add operation row ── */
.pf-ops-add-row {
    display: flex; gap: var(--space-2); align-items: center;
    padding: var(--space-2) 0;
}
.pf-ops-add-input {
    flex: 1; height: 38px;
}
.pf-ops-add-btn2 {
    white-space: nowrap; height: 38px; flex-shrink: 0;
    display: flex; align-items: center; gap: 4px;
}

/* ── Operation card ── */
.pf-op-card {
    background: var(--color-surface-raised); border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light); border-left: 3px solid #93b5e1;
    transition: all 200ms ease; overflow: hidden;
    flex-shrink: 0;
}
.pf-op-card:hover { box-shadow: var(--neu-raised-sm); }
.pf-op-card--expanded { box-shadow: var(--neu-raised); border-color: rgba(147,181,225,0.4); }

.pf-op-card-header {
    display: flex; align-items: center; gap: var(--space-3);
    padding: var(--space-3) var(--space-4); cursor: pointer;
    transition: background 150ms ease;
}
.pf-op-card-header:hover { background: var(--color-bg-hover); }

.pf-op-card-num {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, #93b5e1, #7a9fd0);
    box-shadow: var(--neu-raised-sm);
}

.pf-op-card-info { flex: 1; min-width: 0; }
.pf-op-card-name {
    font-size: var(--text-base); font-weight: 700; color: var(--color-text-primary);
    display: block; line-height: 1.3;
}
.pf-op-card-tags {
    display: flex; align-items: center; gap: var(--space-1); flex-wrap: wrap; margin-top: 3px;
}
.pf-op-tag {
    font-size: 11px; font-weight: 600; color: var(--color-text-tertiary);
    background: var(--color-bg-tertiary); padding: 2px 8px; border-radius: var(--radius-full);
    display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
}
.pf-op-tag--tools { max-width: 160px; overflow: hidden; text-overflow: ellipsis; font-style: italic; }
.pf-op-tag--transversal {
    background: rgba(180,164,214,0.18); color: #7a5ca0; font-weight: 700;
    border: 1px solid rgba(160,142,200,0.3);
}

.pf-op-card-actions {
    display: flex; align-items: center; gap: var(--space-1); flex-shrink: 0;
}
.pf-op-card-chevron {
    width: 26px; height: 26px; border-radius: 50%; border: none; cursor: pointer;
    background: transparent; color: var(--color-text-placeholder);
    display: flex; align-items: center; justify-content: center;
    transition: all 150ms ease;
}
.pf-op-card-chevron:hover { background: var(--color-bg-tertiary); color: var(--color-text-secondary); }

.pf-op-remove {
    width: 24px; height: 24px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(232,160,160,0.12); color: #c46b6b;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: all 150ms ease;
}
.pf-op-remove:hover { background: rgba(232,160,160,0.25); }

/* ── Operation card body (expanded) ── */
.pf-op-card-body {
    padding: 0 var(--space-4) var(--space-4);
    border-top: 1px solid var(--color-border-light);
    animation: opCardExpand 250ms ease;
}

/* ── Transversal toggle ── */
.pf-op-transversal-toggle {
    display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
    padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border-light);
    margin-bottom: var(--space-1);
}
.pf-toggle-label {
    display: flex; align-items: center; gap: var(--space-2); cursor: pointer;
    font-size: var(--text-sm); font-weight: 600; color: var(--color-text-primary);
}
.pf-toggle-label input[type="checkbox"] { display: none; }
.pf-toggle-switch {
    width: 36px; height: 20px; border-radius: 10px; position: relative;
    background: var(--color-bg-tertiary); box-shadow: var(--neu-inset-sm);
    transition: background 200ms ease; flex-shrink: 0;
}
.pf-toggle-switch::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 16px; height: 16px; border-radius: 50%;
    background: #fff; box-shadow: var(--neu-raised-sm);
    transition: transform 200ms ease;
}
.pf-toggle-label input:checked + .pf-toggle-switch {
    background: linear-gradient(135deg, #b4a4d6, #a08ec8);
}
.pf-toggle-label input:checked + .pf-toggle-switch::after {
    transform: translateX(16px);
}
.pf-toggle-text { user-select: none; }
.pf-toggle-hint {
    font-size: 11px; color: var(--color-text-placeholder); font-style: italic;
}
@keyframes opCardExpand {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pf-op-fields {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-2);
    padding-top: var(--space-3);
}
.pf-op-field { display: flex; flex-direction: column; gap: 2px; }
.pf-op-field--wide { grid-column: span 3; }
.pf-op-field label {
    font-size: 11px; font-weight: 700; color: var(--color-text-tertiary);
    text-transform: uppercase; letter-spacing: 0.3px;
}
.pf-op-field .form-input {
    height: 36px; font-size: var(--text-sm);
}

/* ── Summary bar ── */
.pf-ops-summary {
    display: flex; gap: var(--space-3); flex-wrap: wrap;
    padding: var(--space-2) 0 0;
    border-top: 1px solid var(--color-border-light);
    margin-top: var(--space-1);
}
.pf-ops-summary-item {
    display: flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 600; color: var(--color-text-secondary);
    background: var(--color-surface-raised); padding: 4px 12px;
    border-radius: var(--radius-full); box-shadow: var(--neu-raised-sm);
}

/* ── Production unit group card ── */
.pf-group-card {
    background: var(--color-surface-raised); border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light); border-left: 4px solid #b4a4d6;
    transition: all 200ms ease; overflow: hidden; margin-bottom: var(--space-2);
}
.pf-group-card:hover { box-shadow: var(--neu-raised-sm); }
.pf-group-card--expanded { box-shadow: var(--neu-raised); border-color: rgba(180,164,214,0.4); }

.pf-group-header {
    display: flex; align-items: center; gap: var(--space-2);
    padding: var(--space-3) var(--space-4); cursor: pointer;
    transition: background 150ms ease;
}
.pf-group-header:hover { background: var(--color-bg-hover); }

.pf-group-header-left {
    display: flex; align-items: center; gap: var(--space-2); flex: 1; min-width: 0;
}
.pf-group-num {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, #b4a4d6, #a08ec8);
    box-shadow: var(--neu-raised-sm);
}
.pf-group-name {
    font-size: var(--text-base); font-weight: 700; color: var(--color-text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.pf-group-body {
    padding: var(--space-3) var(--space-4) var(--space-4);
    border-top: 1px solid var(--color-border-light);
    animation: opCardExpand 250ms ease;
}

/* ══════════════════════════════════════════════════════════════
   EDIT PANEL — Units & Operations lists
   ══════════════════════════════════════════════════════════════ */
.ef-units-list, .ef-ops-list {
    display: flex; flex-direction: column; gap: var(--space-1);
}
.ef-unit-row {
    display: flex; align-items: center; gap: var(--space-2);
    padding: var(--space-2) var(--space-3); flex-shrink: 0;
    background: var(--color-surface-raised); border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
}
.ef-unit-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ef-unit-name { font-size: var(--text-sm); font-weight: 600; color: var(--color-text-primary); flex: 1; }
.ef-unit-pct { font-size: var(--text-sm); font-weight: 800; color: #93b5e1; font-family: var(--font-mono, monospace); }
.ef-unit-status { font-size: 11px; font-weight: 600; color: var(--color-text-tertiary); text-transform: uppercase; letter-spacing: 0.3px; }

.ef-op-row {
    display: flex; align-items: center; gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--color-surface-raised); border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light); border-left: 3px solid #93b5e1;
}
.ef-op-name { font-size: var(--text-sm); font-weight: 600; color: var(--color-text-primary); flex: 1; }

.ef-delete-btn { display: flex; align-items: center; gap: 4px; font-weight: 600; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
    .pdetail__health-banner { flex-direction: column; align-items: flex-start; }
    .pdetail__health-kpis { margin-left: 0; width: 100%; }
    .pdetail__slideup-grid { grid-template-columns: 1fr; }
    .projects__grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}

@media (max-width: 639px) {
    .projects__toolbar { flex-direction: column; align-items: stretch; }
    .projects__search { max-width: none; }
    .projects__grid { grid-template-columns: 1fr; }
    .projects__hero-content { flex-direction: column; align-items: flex-start; }
    .pdetail__header { flex-direction: column; align-items: flex-start; }
    .pdetail__header-right { width: 100%; justify-content: flex-start; }
    .pdetail__timeline-scroll { padding: var(--space-4) var(--space-4); }
    .pdetail__tl-node { min-width: 80px; }
    .pdetail__tl-dot { width: 34px; height: 34px; }
    .pdetail__tl-dot-num { font-size: 10px; }
    .pdetail__slideup-grid { grid-template-columns: 1fr; }
    .pdetail__slideup-body { padding: var(--space-4); }
    .pdetail__slideup-kpis { grid-template-columns: repeat(2, 1fr); }
    .pdetail__health-kpis { flex-wrap: wrap; }
    .pdetail__image-wrap { min-height: 250px; }
    .hotspot { width: 28px; height: 28px; }
    .hotspot__number { font-size: 10px; }
    .pdetail__cadence-chart { height: 100px; }
    .pf-op-fields { grid-template-columns: 1fr; }
    .pf-op-field--wide { grid-column: span 1; }
    .pf-ops-add-row { flex-direction: column; }
}
