/* ================== PROJECTS LIST ================== */

#projects-page .inv-toolbar {
    margin-bottom: 16px;
}

.projects-list-table thead th {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-secondary, #64748b);
    padding: 0;
}
.projects-list-table thead th:not(:has(.btn-link)) {
    padding: 8px 16px;
}
.projects-list-table thead th .btn-link {
    padding: 10px 16px;
}
.projects-list-table tbody td {
    padding: 10px 16px;
    font-size: 13px;
    vertical-align: middle;
}
.projects-list-table .proj-col-actions {
    text-align: center;
    white-space: nowrap;
}
.projects-list-table .u-text-center .btn-link {
    justify-content: center;
}
#projects-page .project-status-select {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}
#projects-page .project-progress-depth {
    font-size: 12px;
    font-weight: 500;
}
.budget-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}
.budget-badge--danger {
    background-color: #f8d7da;
    color: #721c24;
}
.budget-badge--warning {
    background-color: #fef3cd;
    color: #856404;
}
.budget-badge--ok {
    background-color: #d4edda;
    color: #155724;
}

/* Header budget alert colors */
.budget-alert-warning { color: var(--warning-color, #e67e22) !important; }
.budget-alert-danger { color: var(--danger-color, #e74c3c) !important; font-weight: 700; }

/* ================== PROJECT DETAIL ================== */
#projectDetail-page .detail-page-actions-bar {
    margin-bottom: 12px;
}

#projectDetail-page .project-detail-header {
    padding: 12px 14px;
    margin-top: 0;
    margin-bottom: 12px;
    border-radius: 10px;
}

#projectDetail-page .project-detail-topline {
    display: block;
}

#projectDetail-page .project-detail-kicker {
    display: none;
}

#projectDetail-page .project-detail-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

#projectDetail-page .project-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0;
    color: var(--text-secondary, #64748b);
    font-size: 11px;
    line-height: 1.4;
}

#projectDetail-page .project-detail-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 999px;
    background: var(--bg-secondary, #f8fafc);
    white-space: nowrap;
}

#projectDetail-page .project-detail-meta-label {
    color: var(--text-secondary, #64748b);
    font-weight: 500;
}

#projectDetail-page .detail-tabs {
    margin-bottom: 12px;
}

#projectDetail-page .project-detail-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

#projectDetail-page .project-detail-main-shell,
#projectDetail-page .project-detail-sidebar {
    min-width: 0;
}

#projectDetail-page .project-detail-main-shell {
    display: grid;
    align-content: start;
}

#projectDetail-page .project-detail-shell .detail-log-sidebar {
    margin-top: 0;
}

#projectDetail-page .project-detail-journal {
    top: 0;
}

#projectDetail-page .detail-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
}

#projectDetail-page .project-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

#projectDetail-page .project-section-kicker,
#projectDetail-page .project-budget-card-kicker {
    font-size: 11px;
    font-weight: 700;
}

#projectDetail-page .project-section-title {
    font-size: 18px;
    font-weight: 600;
}

#projectDetail-page .project-section-description {
    max-width: 460px;
    font-size: 13px;
    line-height: 1.55;
    text-align: left;
}

#projectDetail-page .project-budget-records {
    gap: 16px;
}

#projectDetail-page .project-budget-card {
    padding: 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: none;
}

#projectDetail-page .project-budget-card-head {
    align-items: center;
    margin-bottom: 12px;
}

#projectDetail-page .project-budget-card-title {
    font-size: 16px;
    font-weight: 600;
}

#projectDetail-page .project-budget-card-head .btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 500;
}

#projectDetail-page .projects-detail-table thead th {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .projects-detail-table tbody td {
    padding: 10px 16px;
    font-size: 13px;
    vertical-align: middle;
}

#projectDetail-page .projects-detail-table .u-flex-gap-6 {
    gap: 4px;
}

#projectDetail-page .project-progress-log-row {
    font-size: 12px;
}

#projectDetail-page .project-progress-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 6px;
}

#projectDetail-page .scope-overview-shell {
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

#projectDetail-page .scope-overview-shell__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

#projectDetail-page .scope-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

#projectDetail-page .scope-overview-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

#projectDetail-page .scope-overview-card {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--border-color, #e2e8f0);
}

#projectDetail-page .scope-overview-card__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .scope-overview-card strong {
    font-size: 18px;
    line-height: 1.2;
}

#projectDetail-page .scope-overview-card span:last-child {
    font-size: 12px;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .scope-package-card {
    margin-bottom: 8px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

#projectDetail-page .scope-package-card[open] {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

#projectDetail-page .scope-package-card__summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
}

#projectDetail-page .scope-package-card__summary::-webkit-details-marker {
    display: none;
}

#projectDetail-page .scope-package-card__summary-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#projectDetail-page .scope-package-card__title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

#projectDetail-page .scope-package-card__title-row strong {
    font-size: 13px;
    font-weight: 600;
}

#projectDetail-page .scope-package-card__meta {
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .scope-package-card__summary-side {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

#projectDetail-page .scope-package-card__percent {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color, #2563eb);
}

#projectDetail-page .scope-package-card__toggle {
    font-size: 10px;
    color: var(--text-secondary, #64748b);
    transition: transform 0.2s;
}

#projectDetail-page .scope-package-card[open] .scope-package-card__toggle {
    transform: rotate(180deg);
}

#projectDetail-page .scope-package-card__body {
    display: grid;
    gap: 8px;
    padding: 0 14px 12px;
}

#projectDetail-page .scope-package-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

#projectDetail-page .scope-package-card__progress {
    margin-top: -2px;
}

#projectDetail-page .scope-operation-list {
    display: grid;
    gap: 6px;
}

#projectDetail-page .scope-operation-card {
    display: grid;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #e5edf7;
    background: #fbfdff;
}

#projectDetail-page .scope-operation-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

#projectDetail-page .scope-operation-card__title {
    font-size: 12px;
    font-weight: 600;
}

#projectDetail-page .scope-operation-card__subline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: 2px;
    font-size: 11px;
}

#projectDetail-page .scope-operation-card__completion {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color, #2563eb);
    white-space: nowrap;
}

#projectDetail-page .scope-operation-card__metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

#projectDetail-page .scope-metric-pill {
    display: grid;
    gap: 1px;
    min-width: 90px;
    padding: 6px 8px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

#projectDetail-page .scope-metric-pill span {
    font-size: 10px;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .scope-metric-pill strong {
    font-size: 12px;
}

#projectDetail-page .scope-operation-card__logblock {
    padding: 6px 8px;
    border-radius: 6px;
    background: #fff;
    border: 1px dashed #dbe4ef;
}

#projectDetail-page .scope-operation-log-list {
    display: grid;
    gap: 4px;
}

#projectDetail-page .scope-operation-log-item {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

#projectDetail-page .scope-operation-log-item em,
#projectDetail-page .scope-operation-log-empty,
#projectDetail-page .scope-operation-log-more {
    font-size: 11px;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .scope-package-table {
    display: grid;
    gap: 10px;
}

#projectDetail-page .scope-package-table__head {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr) minmax(120px, 0.75fr) minmax(0, 1.45fr) minmax(90px, 0.55fr);
    gap: 12px;
    padding: 0 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .scope-package-table__row {
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

#projectDetail-page .scope-package-table__row[open] {
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

#projectDetail-page .scope-package-table__summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr) minmax(120px, 0.75fr) minmax(0, 1.45fr) minmax(90px, 0.55fr);
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
}

#projectDetail-page .scope-package-table__summary::-webkit-details-marker {
    display: none;
}

#projectDetail-page .scope-package-table__cell {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

#projectDetail-page .scope-package-table__cell strong {
    font-size: 13px;
    line-height: 1.35;
    color: var(--text-primary, #1e293b);
}

#projectDetail-page .scope-package-table__cell span {
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .scope-package-table__cell--percent {
    align-items: flex-end;
    text-align: right;
}

#projectDetail-page .scope-package-table__cell--percent strong {
    font-size: 18px;
    color: var(--primary-color, #2563eb);
}

#projectDetail-page .scope-package-table__title {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

#projectDetail-page .scope-package-table__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--primary-color, #2563eb);
    font-size: 11px;
    flex: 0 0 auto;
    transition: transform 0.2s ease;
}

#projectDetail-page .scope-package-table__row[open] .scope-package-table__toggle {
    transform: rotate(180deg);
}

#projectDetail-page .scope-package-table__title-stack {
    min-width: 0;
    display: grid;
    gap: 3px;
}

#projectDetail-page .scope-package-table__title-stack strong {
    font-size: 14px;
    font-weight: 700;
}

#projectDetail-page .scope-package-table__body {
    padding: 14px 16px 16px;
    border-top: 1px solid var(--border-color, #e2e8f0);
    background: linear-gradient(180deg, #fcfdff 0%, #ffffff 100%);
}

#projectDetail-page .scope-package-table__body-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

#projectDetail-page .scope-package-table__body-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
}

#projectDetail-page .scope-package-table__body-subtitle {
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .scope-package-table__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}

#projectDetail-page .scope-operation-table-shell {
    border-radius: 12px;
    border: 1px solid #e7eef7;
    background: #fff;
    box-shadow: none;
}

#projectDetail-page .scope-operation-table thead th {
    padding: 9px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .scope-operation-table tbody td {
    padding: 12px;
    font-size: 13px;
    vertical-align: top;
}

#projectDetail-page .scope-operation-table .table-stack__primary {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

#projectDetail-page .scope-operation-table .table-stack__secondary {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.45;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .scope-operation-table__actions {
    justify-content: flex-end;
    margin-top: 0;
}

#projectDetail-page .scope-operation-table__actions .icon-action-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
}

#projectDetail-page .scope-completion-cell {
    display: grid;
    gap: 2px;
}

#projectDetail-page .scope-completion-cell strong {
    font-size: 14px;
    color: var(--primary-color, #2563eb);
}

#projectDetail-page .scope-completion-cell span {
    font-size: 11px;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .scope-log-history {
    display: grid;
    gap: 8px;
}

#projectDetail-page .scope-log-history__item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #e2e8f0;
}

#projectDetail-page .scope-log-history__item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

#projectDetail-page .scope-log-history__main {
    min-width: 0;
    display: grid;
    gap: 2px;
}

#projectDetail-page .scope-log-history__main strong {
    font-size: 11px;
    color: var(--text-primary, #1e293b);
}

#projectDetail-page .scope-log-history__main span,
#projectDetail-page .scope-log-history__main em,
#projectDetail-page .scope-log-history__empty,
#projectDetail-page .scope-log-history__more {
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .scope-log-history__main em {
    font-style: normal;
}

#projectDetail-page .scope-operation-table-empty {
    padding: 18px;
    border: 1px dashed #dbe4ef;
    border-radius: 12px;
    background: #f8fbff;
    color: var(--text-secondary, #64748b);
    font-size: 12px;
}

#projectDetail-page .scope-monday-board {
    display: grid;
    gap: 12px;
}

#projectDetail-page .scope-monday-board__header,
#projectDetail-page .scope-monday-row {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) 140px 150px minmax(180px, 1fr) 160px 170px;
}

#projectDetail-page .scope-monday-board__header {
    align-items: center;
    padding: 0 14px;
    color: var(--text-secondary, #64748b);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#projectDetail-page .scope-monday-group {
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.04);
}

#projectDetail-page .scope-monday-group[open] {
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

#projectDetail-page .scope-monday-row {
    align-items: stretch;
}

#projectDetail-page .scope-monday-row--group {
    list-style: none;
    cursor: pointer;
    background: #fff;
}

#projectDetail-page .scope-monday-row--group::-webkit-details-marker {
    display: none;
}

#projectDetail-page .scope-monday-cell {
    min-width: 0;
    padding: 14px 16px;
    border-right: 1px solid #eef2f7;
    border-bottom: 1px solid #eef2f7;
    display: flex;
    align-items: center;
}

#projectDetail-page .scope-monday-row--group .scope-monday-cell:last-child,
#projectDetail-page .scope-monday-row--subitem .scope-monday-cell:last-child {
    border-right: none;
}

#projectDetail-page .scope-monday-row--group .scope-monday-cell {
    background: #fff;
}

#projectDetail-page .scope-monday-row--group .scope-monday-cell--item {
    box-shadow: inset 4px 0 0 #2563eb;
}

#projectDetail-page .scope-monday-cell--progress,
#projectDetail-page .scope-monday-cell--actions {
    justify-content: center;
}

#projectDetail-page .scope-monday-item {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

#projectDetail-page .scope-monday-item__toggle {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe4ef;
    background: #f8fafc;
    color: var(--text-secondary, #64748b);
    font-size: 11px;
    transition: transform 0.18s ease;
}

#projectDetail-page .scope-monday-group[open] .scope-monday-item__toggle {
    transform: rotate(180deg);
}

#projectDetail-page .scope-monday-item__content {
    min-width: 0;
    display: grid;
    gap: 4px;
}

#projectDetail-page .scope-monday-item__content strong {
    font-size: 14px;
    line-height: 1.35;
    color: var(--text-primary, #1e293b);
}

#projectDetail-page .scope-monday-item__content span {
    font-size: 11px;
    line-height: 1.45;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .scope-monday-status,
#projectDetail-page .scope-monday-type {
    width: 100%;
    min-height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

#projectDetail-page .scope-monday-status--green {
    background: #16a34a;
    color: #fff;
}

#projectDetail-page .scope-monday-status--orange {
    background: #f59e0b;
    color: #fff;
}

#projectDetail-page .scope-monday-status--red {
    background: #ef4444;
    color: #fff;
}

#projectDetail-page .scope-monday-status--gray {
    background: #cbd5e1;
    color: #0f172a;
}

#projectDetail-page .scope-monday-type--blue {
    background: #dbeafe;
    color: #1d4ed8;
}

#projectDetail-page .scope-monday-type--teal {
    background: #ccfbf1;
    color: #0f766e;
}

#projectDetail-page .scope-monday-type--amber {
    background: #fef3c7;
    color: #b45309;
}

#projectDetail-page .scope-monday-type--slate {
    background: #e2e8f0;
    color: #334155;
}

#projectDetail-page .scope-monday-progress {
    width: 100%;
    display: grid;
    gap: 8px;
}

#projectDetail-page .scope-monday-progress__bar {
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}

#projectDetail-page .scope-monday-progress__fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
}

#projectDetail-page .scope-monday-progress__fill--blue {
    background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%);
}

#projectDetail-page .scope-monday-progress__fill--orange {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}

#projectDetail-page .scope-monday-progress__fill--green {
    background: linear-gradient(90deg, #4ade80 0%, #16a34a 100%);
}

#projectDetail-page .scope-monday-progress__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

#projectDetail-page .scope-monday-progress__meta strong {
    font-size: 12px;
    color: var(--text-primary, #1e293b);
}

#projectDetail-page .scope-monday-progress__meta span {
    font-size: 11px;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .scope-monday-update {
    display: grid;
    gap: 4px;
}

#projectDetail-page .scope-monday-update strong {
    font-size: 12px;
    color: var(--text-primary, #1e293b);
}

#projectDetail-page .scope-monday-update span {
    font-size: 11px;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .scope-monday-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    width: 100%;
}

#projectDetail-page .scope-monday-actions .icon-action-btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
}

#projectDetail-page .scope-monday-group__body,
#projectDetail-page .scope-monday-standalone__body {
    background: #f8fafc;
}

#projectDetail-page .scope-monday-row--subitem {
    position: relative;
}

#projectDetail-page .scope-monday-row--subitem .scope-monday-cell {
    background: #f8fafc;
}

#projectDetail-page .scope-monday-item--subitem {
    gap: 10px;
}

#projectDetail-page .scope-monday-item__branch {
    position: relative;
    width: 22px;
    min-width: 22px;
    height: 32px;
}

#projectDetail-page .scope-monday-item__branch::before {
    content: '';
    position: absolute;
    left: 10px;
    top: -18px;
    bottom: 8px;
    width: 2px;
    background: #dbe4ef;
}

#projectDetail-page .scope-monday-item__branch::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 14px;
    width: 12px;
    height: 2px;
    background: #dbe4ef;
}

#projectDetail-page .scope-monday-row--subitem.scope-monday-row--last .scope-monday-item__branch::before {
    bottom: 14px;
}

#projectDetail-page .scope-monday-empty {
    padding: 18px;
    margin: 12px;
    border-radius: 12px;
    border: 1px dashed #dbe4ef;
    background: #fff;
    color: var(--text-secondary, #64748b);
    font-size: 12px;
}

#projectDetail-page .scope-monday-standalone {
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

#projectDetail-page .scope-monday-standalone__title {
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    background: #fff;
    border-bottom: 1px solid #eef2f7;
}

/* ── scope-workboard: kompakt Saha İşleri / İş Paketleri tablosu ── */

#projectDetail-page .scope-workboard {
    display: grid;
    gap: 8px;
}

#projectDetail-page .scope-workboard-group,
#projectDetail-page .scope-workboard-standalone {
    border: 1px solid #dbe4ef;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

#projectDetail-page .scope-workboard-group[open] {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

/* Paket özet satırı — 4 sütun (ad+meta / durum / plan / ilerleme), aksiyonlar hover-only */
#projectDetail-page .scope-workboard-group__summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    grid-template-columns: minmax(0, 2.4fr) 110px minmax(140px, 1fr) minmax(160px, 1fr) 100px;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
}

#projectDetail-page .scope-workboard-group__summary::-webkit-details-marker {
    display: none;
}

#projectDetail-page .scope-workboard-group__main,
#projectDetail-page .scope-workboard-group__status,
#projectDetail-page .scope-workboard-group__plan,
#projectDetail-page .scope-workboard-group__progress,
#projectDetail-page .scope-workboard-group__actions {
    min-width: 0;
}

#projectDetail-page .scope-workboard-group__main {
    display: flex;
    align-items: center;
    gap: 10px;
}

#projectDetail-page .scope-workboard-group__toggle {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe4ef;
    background: #f8fafc;
    color: var(--text-secondary, #64748b);
    font-size: 10px;
    transition: transform 0.15s ease;
}

#projectDetail-page .scope-workboard-group[open] .scope-workboard-group__toggle {
    transform: rotate(180deg);
}

#projectDetail-page .scope-workboard-group__identity {
    min-width: 0;
    display: grid;
    gap: 3px;
}

#projectDetail-page .scope-workboard-group__identity strong {
    font-size: 13px;
    line-height: 1.3;
    color: var(--text-primary, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#projectDetail-page .scope-workboard-group__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 11px;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .scope-workboard-group__meta span {
    position: relative;
}

#projectDetail-page .scope-workboard-group__meta span:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #cbd5e1;
    transform: translateY(-50%);
}

/* Durum badge'i küçültüldü */
#projectDetail-page .scope-workboard-status {
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

#projectDetail-page .scope-workboard-status--done {
    background: #dcfce7;
    color: #166534;
}

#projectDetail-page .scope-workboard-status--active {
    background: #fef3c7;
    color: #92400e;
}

#projectDetail-page .scope-workboard-status--blocked {
    background: #fee2e2;
    color: #991b1b;
}

#projectDetail-page .scope-workboard-status--planned {
    background: #e2e8f0;
    color: #334155;
}

#projectDetail-page .scope-workboard-group__plan {
    display: grid;
    gap: 2px;
}

#projectDetail-page .scope-workboard-group__plan strong {
    font-size: 12px;
    line-height: 1.3;
    color: var(--text-primary, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#projectDetail-page .scope-workboard-group__plan span {
    font-size: 10px;
    color: var(--text-secondary, #64748b);
}

/* Progress: ince çizgi + sadece yüzde */
#projectDetail-page .scope-workboard-progress {
    display: grid;
    gap: 4px;
}

#projectDetail-page .scope-workboard-progress__track {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

#projectDetail-page .scope-workboard-progress__fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
}

#projectDetail-page .scope-workboard-progress__fill--done {
    background: linear-gradient(90deg, #4ade80 0%, #16a34a 100%);
}

#projectDetail-page .scope-workboard-progress__fill--active {
    background: linear-gradient(90deg, #facc15 0%, #f59e0b 100%);
}

#projectDetail-page .scope-workboard-progress__fill--blocked {
    background: linear-gradient(90deg, #fda4af 0%, #ef4444 100%);
}

#projectDetail-page .scope-workboard-progress__fill--planned {
    background: linear-gradient(90deg, #cbd5e1 0%, #94a3b8 100%);
}

#projectDetail-page .scope-workboard-progress__meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

#projectDetail-page .scope-workboard-progress__meta strong {
    font-size: 11px;
    color: var(--text-primary, #1e293b);
}

/* Paket aksiyonları: daima görünür (kompakt ikonlar) */
#projectDetail-page .scope-workboard-group__actions,
#projectDetail-page .scope-workboard-subtable__cell--actions {
    display: flex;
    justify-content: flex-end;
}

#projectDetail-page .scope-workboard-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

#projectDetail-page .scope-workboard-actions .icon-action-btn {
    width: 26px;
    height: 26px;
    min-width: 26px;
    font-size: 11px;
}

/* Subtable aksiyonlar: hover'da görünsün */
#projectDetail-page .scope-workboard-subtable__cell--actions .scope-workboard-actions {
    opacity: 0;
    transition: opacity 0.15s ease;
}

#projectDetail-page .scope-workboard-subtable__row:hover .scope-workboard-subtable__cell--actions .scope-workboard-actions {
    opacity: 1;
}

#projectDetail-page .scope-workboard-group__body {
    padding: 0 14px 12px;
}

#projectDetail-page .scope-workboard-subtable {
    border: 1px solid #eef2f7;
    border-radius: 8px;
    overflow: hidden;
    background: #fbfcfe;
}

/* Subtable: 5 sütun (ad / planlanan / gerçekleşen / ilerleme / işlemler) */
#projectDetail-page .scope-workboard-subtable__head,
#projectDetail-page .scope-workboard-subtable__row {
    display: grid;
    grid-template-columns: minmax(0, 2.4fr) 100px 100px minmax(120px, 1fr) 100px;
    align-items: center;
    gap: 10px;
}

#projectDetail-page .scope-workboard-subtable__head {
    padding: 7px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
    color: var(--text-secondary, #64748b);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#projectDetail-page .scope-workboard-subtable__row {
    padding: 0 12px;
    background: #fff;
}

#projectDetail-page .scope-workboard-subtable__row + .scope-workboard-subtable__row {
    border-top: 1px solid #f1f5f9;
}

#projectDetail-page .scope-workboard-subtable__cell {
    min-width: 0;
    padding: 8px 0;
}

#projectDetail-page .scope-workboard-op {
    display: grid;
    gap: 3px;
}

#projectDetail-page .scope-workboard-op__name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

#projectDetail-page .scope-workboard-op strong,
#projectDetail-page .scope-workboard-subtable__cell strong {
    font-size: 12px;
    color: var(--text-primary, #1e293b);
}

#projectDetail-page .scope-workboard-op__meta {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
}

#projectDetail-page .scope-workboard-op__meta span,
#projectDetail-page .scope-workboard-op__lastlog {
    font-size: 10px;
    color: var(--text-secondary, #64748b);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

#projectDetail-page .scope-workboard-empty {
    padding: 12px;
    color: var(--text-secondary, #64748b);
    font-size: 11px;
    background: #fff;
}

#projectDetail-page .scope-workboard-standalone__head {
    padding: 12px 14px 8px;
    display: grid;
    gap: 2px;
}

#projectDetail-page .scope-workboard-standalone__head strong {
    font-size: 12px;
    color: var(--text-primary, #1e293b);
}

#projectDetail-page .scope-workboard-standalone__head span {
    font-size: 11px;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .scope-workboard-standalone .scope-workboard-subtable {
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-radius: 0;
}

#projectDetail-page .scope-package-table {
    padding: 12px;
    border-radius: 20px;
    border: 1px solid #dbe7f5;
    background:
        linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0%, rgba(244, 248, 254, 0.96) 100%);
}

#projectDetail-page .scope-package-table__head {
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 100%);
    color: rgba(255, 255, 255, 0.74);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

#projectDetail-page .scope-package-table__row {
    border-color: #d7e3f4;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

#projectDetail-page .scope-package-table__summary {
    padding: 0;
    gap: 0;
    background: #fff;
}

#projectDetail-page .scope-package-table__cell {
    padding: 15px 16px;
    justify-content: center;
}

#projectDetail-page .scope-package-table__cell:not(:last-child) {
    border-right: 1px solid #edf2f8;
}

#projectDetail-page .scope-package-table__cell--package {
    justify-content: flex-start;
}

#projectDetail-page .scope-package-table__cell--progress {
    background: linear-gradient(180deg, #fbfdff 0%, #f7fbff 100%);
}

#projectDetail-page .scope-package-table__title {
    align-items: center;
    gap: 12px;
}

#projectDetail-page .scope-package-table__accent {
    width: 4px;
    align-self: stretch;
    border-radius: 999px;
    flex: 0 0 auto;
}

#projectDetail-page .scope-package-table__accent--sky {
    background: linear-gradient(180deg, #38bdf8 0%, #2563eb 100%);
}

#projectDetail-page .scope-package-table__accent--mint {
    background: linear-gradient(180deg, #34d399 0%, #059669 100%);
}

#projectDetail-page .scope-package-table__accent--amber {
    background: linear-gradient(180deg, #fbbf24 0%, #f97316 100%);
}

#projectDetail-page .scope-package-table__toggle {
    background: #f3f7ff;
    border: 1px solid #d9e6fb;
}

#projectDetail-page .scope-board-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    border: 1px solid transparent;
}

#projectDetail-page .scope-board-chip--status-success {
    background: #16a34a;
    color: #fff;
}

#projectDetail-page .scope-board-chip--status-warning {
    background: #f59e0b;
    color: #fff;
}

#projectDetail-page .scope-board-chip--status-info {
    background: #3b82f6;
    color: #fff;
}

#projectDetail-page .scope-board-chip--status-secondary {
    background: #cbd5e1;
    color: #0f172a;
}

#projectDetail-page .scope-board-chip--subject-sky {
    background: #e0f2fe;
    border-color: #bae6fd;
    color: #075985;
}

#projectDetail-page .scope-board-chip--subject-mint {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

#projectDetail-page .scope-board-chip--subject-amber {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

#projectDetail-page .scope-progress-meter {
    display: grid;
    gap: 6px;
}

#projectDetail-page .scope-progress-meter span {
    font-size: 11px;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .scope-progress-meter__track {
    height: 8px;
    border-radius: 999px;
    background: #e8eef8;
    overflow: hidden;
}

#projectDetail-page .scope-progress-meter__fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
}

#projectDetail-page .scope-progress-meter__fill--blue {
    background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%);
}

#projectDetail-page .scope-progress-meter__fill--amber {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}

#projectDetail-page .scope-progress-meter__fill--green {
    background: linear-gradient(90deg, #4ade80 0%, #16a34a 100%);
}

#projectDetail-page .scope-operation-table-shell {
    border-color: #dce8f8;
    background: #fdfefe;
}

#projectDetail-page .scope-operation-table thead th {
    background: #eef4fb;
    color: #52627a;
    border-bottom-color: #d7e3f4;
}

#projectDetail-page .scope-operation-table__row {
    background: #fff;
}

#projectDetail-page .scope-operation-table__row td {
    border-bottom-color: #edf2f8;
}

#projectDetail-page .scope-operation-table__name {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

#projectDetail-page .scope-operation-table__subitem-dot {
    position: relative;
    width: 10px;
    height: 10px;
    margin-top: 4px;
    border-radius: 999px;
    background: #60a5fa;
    box-shadow: 0 0 0 4px #e0f2fe;
    flex: 0 0 auto;
}

#projectDetail-page .scope-operation-table__subitem-dot::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -18px;
    bottom: 100%;
    width: 2px;
    transform: translateX(-50%);
    background: #d8e4f4;
}

#projectDetail-page .scope-operation-table tbody tr:first-child .scope-operation-table__subitem-dot::before {
    display: none;
}

#projectDetail-page .scope-log-history {
    min-width: 190px;
}

#projectDetail-page .scope-log-history__item {
    padding: 8px 0;
}

#projectDetail-page .mini-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 6px;
    margin-top: 8px;
}

#projectDetail-page .mini-stat-card {
    background: var(--bg-secondary, #f8f9fa);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 6px;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

#projectDetail-page .mini-stat-card span {
    font-size: 10px;
    color: var(--text-secondary, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

#projectDetail-page .mini-stat-card strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
}

#projectDetail-page .mini-stat-card small {
    font-size: 10px;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .scope-operations-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

#projectDetail-page .scope-operation-row {
    padding: 6px 10px;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 4px;
    border-left: 3px solid var(--primary-color, #3b82f6);
}

#projectDetail-page .scope-operation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

#projectDetail-page .scope-task-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

#projectDetail-page .scope-task-chip__label {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .scope-standalone-shell {
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--border-color, #e2e8f0);
    background: #fff;
}

#projectDetail-page .scope-standalone-shell__head {
    margin-bottom: 14px;
}

#projectDetail-page .scope-empty-inline {
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff;
    color: var(--text-secondary, #64748b);
    font-size: 12px;
    border: 1px dashed #dbe4ef;
}

@media (max-width: 900px) {
    #projectDetail-page .scope-overview-cards {
        grid-template-columns: 1fr;
    }

    #projectDetail-page .scope-monday-board__header {
        display: none;
    }

    #projectDetail-page .scope-monday-row {
        grid-template-columns: 1fr;
    }

    #projectDetail-page .scope-monday-cell {
        border-right: none;
        padding: 12px 14px;
    }

    #projectDetail-page .scope-monday-cell--actions,
    #projectDetail-page .scope-monday-actions {
        justify-content: flex-start;
    }

    #projectDetail-page .scope-workboard-group__summary,
    #projectDetail-page .scope-workboard-subtable__head,
    #projectDetail-page .scope-workboard-subtable__row {
        grid-template-columns: 1fr;
    }

    #projectDetail-page .scope-workboard-group__summary {
        padding: 16px;
    }

    #projectDetail-page .scope-workboard-group__body {
        padding: 0 16px 16px;
    }

    #projectDetail-page .scope-workboard-subtable__head {
        display: none;
    }

    #projectDetail-page .scope-workboard-subtable__row {
        padding: 12px 14px;
    }

    #projectDetail-page .scope-workboard-subtable__cell {
        padding: 4px 0;
    }

    #projectDetail-page .scope-workboard-group__actions,
    #projectDetail-page .scope-workboard-subtable__cell--actions,
    #projectDetail-page .scope-workboard-actions {
        justify-content: flex-start;
    }

    #projectDetail-page .scope-package-table__head {
        display: none;
    }

    #projectDetail-page .scope-package-table__summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #projectDetail-page .scope-package-table__cell {
        padding: 12px 14px;
    }

    #projectDetail-page .scope-package-table__cell:not(:last-child) {
        border-right: none;
    }

    #projectDetail-page .scope-package-table__cell--package,
    #projectDetail-page .scope-package-table__body-head {
        grid-column: 1 / -1;
    }

    #projectDetail-page .scope-package-table__cell--percent {
        align-items: flex-start;
        text-align: left;
    }

    #projectDetail-page .scope-package-table__body-head {
        flex-direction: column;
        align-items: stretch;
    }

    #projectDetail-page .scope-package-table__actions {
        justify-content: stretch;
    }

    #projectDetail-page .scope-log-history__item {
        flex-direction: column;
        align-items: stretch;
    }

    #projectDetail-page .scope-log-history__item .project-progress-delete-btn {
        align-self: flex-end;
    }

    #projectDetail-page .scope-overview-shell__head,
    #projectDetail-page .scope-package-card__summary,
    #projectDetail-page .scope-operation-card__head {
        grid-template-columns: 1fr;
        display: grid;
    }

    #projectDetail-page .scope-toolbar-actions,
    #projectDetail-page .scope-package-card__actions,
    #projectDetail-page .scope-operation-actions {
        justify-content: stretch;
    }

    #projectDetail-page .scope-operation-log-item {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    #projectDetail-page .scope-task-chip__label {
        max-width: none;
        white-space: normal;
    }
}

#projectDetail-page .transaction-name {
    font-size: 13px;
    font-weight: 600;
}

#projectDetail-page .transaction-meta {
    font-size: 11px;
    line-height: 1.45;
}

#projectDetail-page .transaction-amount {
    font-size: 13px;
    white-space: nowrap;
}

#projectDetail-page .transaction-item--compact {
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    border-left-width: 2px;
    border-radius: 10px;
}

#projectDetail-page .transaction-item--compact .transaction-info {
    min-width: 0;
}

#projectDetail-page .transaction-item--compact .transaction-category {
    margin-bottom: 2px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

#projectDetail-page .transaction-side {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    flex: 0 0 auto;
}

#projectDetail-page .project-budget-table thead th {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .project-budget-table tbody td {
    padding: 10px 12px;
    font-size: 13px;
    vertical-align: middle;
}

#projectDetail-page .project-budget-table .table-stack__primary {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

#projectDetail-page .project-budget-table .table-stack__secondary {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.45;
    color: var(--text-secondary, #64748b);
}

#projectDetail-page .project-tx-actions {
    gap: 4px;
    margin-top: 0;
    justify-content: center;
}

#projectDetail-page .project-tx-actions .icon-action-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
}

#projectDetail-page .project-detail-delete-btn {
    color: var(--text-secondary, #64748b);
    border-color: var(--border-color, #e2e8f0);
    background: #fff;
}

#projectDetail-page .project-detail-delete-btn:hover {
    color: var(--danger-color, #ef4444);
    border-color: rgba(239, 68, 68, 0.18);
    background: rgba(239, 68, 68, 0.04);
}

#projectDetail-page .project-journal-toggle {
    position: relative;
    align-items: center;
    gap: 7px;
    max-width: 280px;
}

#projectDetail-page .project-journal-toggle span:not(.project-journal-toggle__count) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#projectDetail-page .project-journal-toggle.is-active {
    color: var(--primary-color, #2563eb);
    border-color: rgba(37, 99, 235, 0.28);
    background: rgba(37, 99, 235, 0.06);
}

#projectDetail-page .project-journal-toggle__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--danger-color, #ef4444);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

#projectDetail-page .project-detail-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    width: min(440px, calc(100vw - 24px));
    min-width: 0;
    padding: 0;
    background: #ffffff;
    border-left: 1px solid var(--border-color, #e2e8f0);
    box-shadow: -18px 0 42px rgba(15, 23, 42, 0.16);
    transform: translateX(104%);
    transition: transform 0.22s ease, visibility 0s linear 0.22s;
    visibility: hidden;
    pointer-events: none;
}

#projectDetail-page .project-detail-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

#projectDetail-page .project-detail-drawer .detail-log-sidebar {
    position: static;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    margin-top: 0;
    padding: 18px;
    overflow-y: auto;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

#projectDetail-page .project-detail-drawer__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

#projectDetail-page .project-detail-drawer__kicker {
    margin-bottom: 4px;
    color: var(--text-secondary, #64748b);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#projectDetail-page .project-detail-drawer__title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary, #1e293b);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

#projectDetail-page .project-detail-drawer__title i {
    color: var(--primary-color, #2563eb);
}

#projectDetail-page .project-detail-drawer__close {
    flex: 0 0 auto;
}

#projectDetail-page .project-detail-drawer .inv-note-section {
    max-height: none;
    min-height: 180px;
}

#projectDetail-page .project-detail-drawer .detail-log-list {
    padding-bottom: 18px;
}

@media (max-width: 700px) {
    #projectDetail-page .detail-page-actions-bar {
        align-items: stretch;
    }

    #projectDetail-page .detail-page-actions-bar > .u-flex-gap-8-wrap {
        justify-content: stretch;
    }

    #projectDetail-page .project-journal-toggle {
        max-width: none;
        width: 100%;
        justify-content: center;
    }

    #projectDetail-page .project-detail-drawer {
        width: 100vw;
    }
}


/* ================== MILESTONE TIMELINE ================== */
.milestone-item {
    position: relative;
    padding: 12px 16px 12px 28px;
    border-left: 2px solid var(--border-color, #dee2e6);
    margin-left: 6px;
}
.milestone-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 18px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color, #dee2e6);
    border: 2px solid #fff;
}
.milestone-item--completed::before { background: var(--success-color, #28a745); }
.milestone-item--overdue::before { background: var(--danger-color, #dc3545); }
.milestone-item--active::before { background: var(--primary-color, #3b82f6); }

/* ================== ISSUE CARDS ================== */
.issue-card {
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
}
.issue-card--risk { border-left: 4px solid var(--warning-color, #f59e0b); }
.issue-card--issue { border-left: 4px solid var(--danger-color, #dc3545); }
.severity-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}
.severity-badge--critical, .severity-badge--high {
    background-color: #f8d7da;
    color: #721c24;
}
.severity-badge--medium {
    background-color: #fef3cd;
    color: #856404;
}
.severity-badge--low {
    background-color: #d4edda;
    color: #155724;
}


/* ================== CLOSURE CHECKLIST ================== */
.closure-checklist { list-style: none; padding: 0; margin: 0; }
.closure-checklist li {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color, #dee2e6);
    display: flex;
    align-items: center;
    gap: 8px;
}
.closure-checklist li:last-child { border-bottom: none; }
.closure-checklist label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
