﻿.template-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 16px;
    align-items: start;
}

@media (max-width: 900px) {
    .template-layout { grid-template-columns: 1fr; }
}

.template-list-pane,
.template-detail-pane {
    background: #fff;
    border: 1px solid var(--proj-border);
    border-radius: 8px;
    overflow: hidden;
}

.pane-head {
    padding: 10px 14px;
    background: #f8fafc;
    border-bottom: 1px solid var(--proj-border);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--proj-muted);
}

.template-item {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: #fff;
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
}

.template-item:hover { background: #f8fafc; }

.template-item.active {
    background: #f1f5f9;
    box-shadow: inset 3px 0 0 var(--proj-green);
}

.template-item-name { font-size: 14px; font-weight: 600; color: var(--proj-navy); }
.template-item-meta { font-size: 12px; color: var(--proj-muted); margin-top: 2px; }

.template-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--proj-border);
}

.template-detail-head h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--proj-navy);
    margin: 0;
}

.template-summary { font-size: 12px; color: var(--proj-muted); margin-top: 2px; }
.template-detail-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }

.template-tree { padding: 12px 16px; }

.template-phase {
    border: 1px solid var(--proj-border);
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
}

.template-phase-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border-bottom: 1px solid var(--proj-border);
}

.template-phase-name { font-size: 14px; font-weight: 600; color: var(--proj-navy); }

.template-phase-hours {
    margin-left: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--proj-muted);
    font-variant-numeric: tabular-nums;
}

.template-phase-actions { display: flex; gap: 4px; }

.template-punchlist {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 8px 26px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}

.template-punchlist:last-child { border-bottom: none; }
.template-punchlist.empty { color: var(--proj-muted); font-style: italic; }
.template-punchlist-name { flex: 1; }

.template-punchlist-hours {
    font-variant-numeric: tabular-nums;
    color: var(--proj-muted);
    min-width: 60px;
    text-align: right;
}

.template-punchlist-actions { display: flex; gap: 4px; }
