/* 접근 권한 관리 스타일 */
.access-control-container {
    padding: 20px;
    background: #f8f9fa;
    min-height: 100vh;
}

/* 헤더 */
.access-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px 25px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e4e8;
}

.header-left {
    flex: 1;
}

.page-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #24292e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-icon {
    font-size: 24px;
}

.header-subtitle {
    margin-top: 5px;
    color: #586069;
    font-size: 14px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* 정보 카드 */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.info-card {
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 15px;
}

.info-card.members {
    border-left: 4px solid #0366d6;
}

.info-card.trial {
    border-left: 4px solid #fb8500;
}

.card-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f8fa;
    border-radius: 8px;
}

.card-content h4 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #24292e;
}

.card-content p {
    margin: 0 0 12px;
    color: #586069;
    font-size: 14px;
}

.card-content ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.card-content li {
    padding: 4px 0;
    font-size: 13px;
    color: #586069;
}

/* 빠른 설정 */
.quick-settings {
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.quick-settings h3 {
    margin: 0 0 15px;
    font-size: 16px;
    color: #24292e;
}

.preset-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 10px 16px;
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    color: #24292e;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preset-btn:hover {
    background: #f6f8fa;
    border-color: #d1d5da;
}

/* 폴더 권한 섹션 */
.folder-access-section {
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e4e8;
}

.section-header h3 {
    margin: 0;
    font-size: 16px;
    color: #24292e;
}

.section-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-input {
    padding: 6px 12px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    font-size: 14px;
    width: 200px;
}

.view-toggle {
    display: flex;
    gap: 4px;
}

.toggle-btn {
    padding: 6px 12px;
    background: white;
    border: 1px solid #e1e4e8;
    color: #586069;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.toggle-btn:first-child {
    border-radius: 6px 0 0 6px;
}

.toggle-btn:last-child {
    border-radius: 0 6px 6px 0;
    border-left: none;
}

.toggle-btn.active {
    background: #0366d6;
    color: white;
    border-color: #0366d6;
}

/* 트리 컨트롤 */
.tree-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1e4e8;
}

.selected-count {
    margin-left: auto;
    font-size: 14px;
    color: #586069;
}

#publicCount {
    font-weight: 600;
    color: #0366d6;
}

/* 폴더 트리 */
.folder-tree {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 10px;
    background: #f6f8fa;
}

.tree-node {
    margin: 2px 0;
}

.node-content {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    cursor: default;
}

.node-content:hover {
    background: white;
}

.node-toggle {
    width: 20px;
    cursor: pointer;
    user-select: none;
    color: #586069;
}

.node-toggle.invisible {
    visibility: hidden;
}

.node-checkbox {
    margin: 0 8px;
}

.node-icon {
    margin-right: 8px;
    font-size: 16px;
}

.node-name {
    font-weight: 500;
    color: #24292e;
    margin-right: 8px;
}

.node-info {
    color: #586069;
    font-size: 12px;
    margin-left: auto;
    margin-right: 10px;
    font-style: italic;
}

.node-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.node-badge.public {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.node-badge.private {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.tree-children {
    margin-left: 20px;
}

/* 폴더 테이블 */
.folder-table {
    width: 100%;
    border-collapse: collapse;
}

.folder-table thead {
    background: #f6f8fa;
    border-bottom: 1px solid #e1e4e8;
}

.folder-table th {
    padding: 10px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #24292e;
}

.folder-table tbody tr {
    border-bottom: 1px solid #e1e4e8;
}

.folder-table tbody tr:hover {
    background: #f6f8fa;
}

.folder-table td {
    padding: 12px 10px;
    font-size: 14px;
}

.folder-path-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.folder-icon {
    font-size: 16px;
}

.access-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.access-badge.allowed {
    background: #d1fae5;
    color: #065f46;
}

.access-badge.denied {
    background: #fee2e2;
    color: #991b1b;
}

.toggle-access {
    padding: 4px 12px;
    font-size: 12px;
}

/* 변경 사항 요약 */
.changes-summary {
    background: #fffbf0;
    border: 1px solid #fdb833;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.changes-summary h4 {
    margin: 0 0 15px;
    font-size: 14px;
    color: #735c0f;
}

.changes-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.changes-content h5 {
    margin: 0 0 8px;
    font-size: 13px;
    color: #586069;
}

.changes-content ul {
    margin: 0;
    padding: 0 0 0 20px;
    font-size: 13px;
}

/* 버튼 스타일 */
.btn {
    padding: 8px 16px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
}

.btn-primary {
    background: #0366d6;
    color: white;
    border-color: #0366d6;
}

.btn-primary:hover {
    background: #0256c7;
}

.btn-secondary {
    background: white;
    color: #24292e;
}

.btn-secondary:hover {
    background: #f6f8fa;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* 토스트 */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10000;
}

.toast.show {
    opacity: 1;
}

.toast-success {
    border-left: 4px solid #28a745;
}

.toast-error {
    border-left: 4px solid #d73a49;
}

.toast-info {
    border-left: 4px solid #0366d6;
}

/* 반응형 */
@media (max-width: 768px) {
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .section-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-input {
        width: 100%;
    }
    
    .preset-buttons {
        flex-direction: column;
    }
    
    .preset-btn {
        width: 100%;
        justify-content: center;
    }
}
