/* テーブル設定 */
.matrix-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
}

.matrix-table th,
.matrix-table td {
    white-space: nowrap;
    vertical-align: middle;
    overflow: hidden;
}

.sticky-col {
    position: sticky;
    left: 0;
    background-color: #ffffff;
    z-index: 10;
    border-right: 1px solid #f1f5f9;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.02);
}

thead th {
    position: sticky;
    top: 0;
    background-color: #f8fafc;
    z-index: 20;
    box-shadow: 0 1px 0 #e2e8f0;
}

thead th.sticky-col {
    z-index: 30;
    left: 0;
}

tr:hover td {
    background-color: #f1f5f9;
}

tr:hover td.sticky-col {
    background-color: #f1f5f9;
}

.group-border-bottom {
    border-bottom: 2px solid #cbd5e1;
}

.row-border-bottom {
    border-bottom: 1px dashed #e2e8f0;
}

.tree-connector {
    position: relative;
    padding-left: 20px;
}

.tree-connector::before {
    content: '';
    position: absolute;
    top: -25px;
    left: 8px;
    width: 2px;
    height: 45px;
    background-color: #cbd5e1;
    z-index: 5;
}

.tree-connector::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 8px;
    width: 8px;
    height: 2px;
    background-color: #cbd5e1;
    z-index: 5;
}

/* アイコンボタン */
.pf-link-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    text-decoration: none;
}

.pf-icon-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    flex-shrink: 0;
    font-size: 10px;
}

a.pf-link-container:hover .pf-icon-btn {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
}

.status-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    border: 1.5px solid #fff;
    z-index: 10;
}

.status-ok {
    background-color: #10b981;
    color: white;
}

.status-link {
    background-color: #3b82f6;
    color: white;
}

.status-lock {
    background-color: #ef4444;
    color: white;
}

.pf-link-container::after {
    content: attr(data-label);
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: #64748b;
    background: rgba(255, 255, 255, 0.95);
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    white-space: nowrap;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 30;
}

.pf-link-container:hover::after {
    opacity: 1;
}

.mobile-pf-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 4px;
    margin-top: 6px;
}

@media (max-width: 450px) {
    .mobile-pf-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }
}

.header-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    margin: 0 auto 2px;
}